aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-04-17 18:08:55 -0600
committerSimon Glass <sjg@chromium.org>2020-04-26 14:25:21 -0600
commitc3a13cc3331846a900f0bf6d003357d5c6b7dbe3 (patch)
tree071f9cae17aa7fb12e899a01675864ba921aa467 /tools
parent83a45187715e719bfe520b9ca0373bd8b5bee8aa (diff)
downloadu-boot-c3a13cc3331846a900f0bf6d003357d5c6b7dbe3.zip
u-boot-c3a13cc3331846a900f0bf6d003357d5c6b7dbe3.tar.gz
u-boot-c3a13cc3331846a900f0bf6d003357d5c6b7dbe3.tar.bz2
patman: Drop Python 2 StringIO code
We can rely on Python 3 now, so drop the workaround for importing StringIO. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/patman/func_test.py5
-rw-r--r--tools/patman/settings.py5
-rw-r--r--tools/patman/test_util.py5
3 files changed, 3 insertions, 12 deletions
diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py
index 76319ff..748e225 100644
--- a/tools/patman/func_test.py
+++ b/tools/patman/func_test.py
@@ -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
diff --git a/tools/patman/settings.py b/tools/patman/settings.py
index 9ac96c4..21e8fc4 100644
--- a/tools/patman/settings.py
+++ b/tools/patman/settings.py
@@ -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>
diff --git a/tools/patman/test_util.py b/tools/patman/test_util.py
index 4338dbc..4d0085e 100644
--- a/tools/patman/test_util.py
+++ b/tools/patman/test_util.py
@@ -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]