summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2010-04-26 18:49:06 (GMT)
committerGreg Noel <GregNoel@tigris.org>2010-04-26 18:49:06 (GMT)
commit28b036c0f803c2a156de7e155daa0f8635e95d89 (patch)
treef4c4ceb24a3fe3001dc394e833731ebdfbcca208 /bin
parent186b632fd20283e821b6a65c72772635017945fb (diff)
downloadSCons-28b036c0f803c2a156de7e155daa0f8635e95d89.zip
SCons-28b036c0f803c2a156de7e155daa0f8635e95d89.tar.gz
SCons-28b036c0f803c2a156de7e155daa0f8635e95d89.tar.bz2
http://scons.tigris.org/issues/show_bug.cgi?id=2345
Apply all the remaining changes from the fixers.
Diffstat (limited to 'bin')
-rw-r--r--bin/scons-proc.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/scons-proc.py b/bin/scons-proc.py
index 922ddd6..b8b1238 100644
--- a/bin/scons-proc.py
+++ b/bin/scons-proc.py
@@ -10,12 +10,16 @@
# and/or .mod files contining the ENTITY definitions for each item,
# or in man-page-formatted output.
#
+import os
+import sys
import getopt
-import os.path
import re
-import StringIO
-import sys
import xml.sax
+try:
+ from io import StringIO
+except ImportError:
+ # No 'io' module or no StringIO in io
+ exec('from cStringIO import StringIO')
import SConsDoc
@@ -100,7 +104,7 @@ for f in args:
content = content.replace('-->\n', '-->')
input = xml_preamble + content + xml_postamble
try:
- saxparser.parse(StringIO.StringIO(input))
+ saxparser.parse(StringIO(input))
except:
sys.stderr.write("error in %s\n" % f)
raise