summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2012-02-04 19:24:27 (GMT)
committerGary Oberbrunner <garyo@oberbrunner.com>2012-02-04 19:24:27 (GMT)
commit6afc2b79e23eb7d7194c62f7463e1c2a404fbcc8 (patch)
treef3bc96d75e6f879dbe3119585147b6f9a4d87962 /bin
parent466f863cb8623cd4cae6b0f6199c78a6350e67cd (diff)
downloadSCons-6afc2b79e23eb7d7194c62f7463e1c2a404fbcc8.zip
SCons-6afc2b79e23eb7d7194c62f7463e1c2a404fbcc8.tar.gz
SCons-6afc2b79e23eb7d7194c62f7463e1c2a404fbcc8.tar.bz2
Fix bootstrap.py problem with Python 2.7
io.StringIO only takes/uses unicode, so convert string to unicode.
Diffstat (limited to 'bin')
-rw-r--r--bin/scons-proc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/scons-proc.py b/bin/scons-proc.py
index 6d15816..1f537c7 100644
--- a/bin/scons-proc.py
+++ b/bin/scons-proc.py
@@ -17,7 +17,7 @@ import string
import sys
import xml.sax
try:
- from io import StringIO
+ from io import StringIO # usable as of 2.6; takes unicode only
except ImportError:
# No 'io' module or no StringIO in io
exec('from cStringIO import StringIO')
@@ -105,7 +105,7 @@ for f in args:
content = content.replace('-->\n', '-->')
input = xml_preamble + content + xml_postamble
try:
- saxparser.parse(StringIO(input))
+ saxparser.parse(StringIO(unicode(input)))
except:
sys.stderr.write("error in %s\n" % f)
raise