summaryrefslogtreecommitdiffstats
path: root/test/option
diff options
context:
space:
mode:
authorDirk Baechle <dl9obn@darc.de>2015-12-10 17:01:37 (GMT)
committerDirk Baechle <dl9obn@darc.de>2015-12-10 17:01:37 (GMT)
commite7de9d22c9503cf29e5d8b5e7813f060d59a00e5 (patch)
treed88708df964dc576ad2a85eedd9ef08cd29a0240 /test/option
parent78fb1b6ef0e42954feb668efb84de59173221374 (diff)
downloadSCons-e7de9d22c9503cf29e5d8b5e7813f060d59a00e5.zip
SCons-e7de9d22c9503cf29e5d8b5e7813f060d59a00e5.tar.gz
SCons-e7de9d22c9503cf29e5d8b5e7813f060d59a00e5.tar.bz2
removed several pre-2.7 methods and imports, including some basic refactorings
Diffstat (limited to 'test/option')
-rw-r--r--test/option/profile.py21
1 files changed, 8 insertions, 13 deletions
diff --git a/test/option/profile.py b/test/option/profile.py
index d53c690..4d6caae 100644
--- a/test/option/profile.py
+++ b/test/option/profile.py
@@ -24,19 +24,14 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import sys
-try:
- import io
- _StringIO = io.StringIO
-except (ImportError, AttributeError):
- # Pre-2.6 Python has no "io" module.
- exec('from cStringIO import StringIO')
-else:
- # TODO(2.6): In 2.6 and beyond, the io.StringIO.write() method
- # requires unicode strings. This subclass can probably be removed
- # when we drop support for Python 2.6.
- class StringIO(_StringIO):
- def write(self, s):
- _StringIO.write(self, unicode(s))
+import io
+_StringIO = io.StringIO
+# TODO(2.6): In 2.6 and beyond, the io.StringIO.write() method
+# requires unicode strings. This subclass can probably be removed
+# when we drop support for Python 2.6.
+class StringIO(_StringIO):
+ def write(self, s):
+ _StringIO.write(self, unicode(s))
import TestSCons