提交 c3a13cc3 编写于 作者: S Simon Glass

patman: Drop Python 2 StringIO code

We can rely on Python 3 now, so drop the workaround for importing
StringIO.
Signed-off-by: NSimon Glass <sjg@chromium.org>
上级 83a45187
......@@ -12,10 +12,7 @@ import sys
import tempfile
import unittest
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
from io import StringIO
import gitutil
import patchstream
......
......@@ -34,10 +34,7 @@ class _ProjectConfigParser(ConfigParser.SafeConfigParser):
- Merge general default settings/aliases with project-specific ones.
# Sample config used for tests below...
>>> try:
... from StringIO import StringIO
... except ImportError:
... from io import StringIO
>>> from io import StringIO
>>> sample_config = '''
... [alias]
... me: Peter P. <likesspiders@example.com>
......
......@@ -10,10 +10,7 @@ import sys
import command
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
from io import StringIO
PYTHON = 'python%d' % sys.version_info[0]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册