diff options
author | Greg Noel <GregNoel@tigris.org> | 2010-04-26 18:49:06 +0000 |
---|---|---|
committer | Greg Noel <GregNoel@tigris.org> | 2010-04-26 18:49:06 +0000 |
commit | c66e92f020a391d461b594d6104f61a3abadb940 (patch) | |
tree | f4c4ceb24a3fe3001dc394e833731ebdfbcca208 /bin | |
parent | fb4b38a985a2b33b6a63370f841f8c3c117187a3 (diff) | |
download | scons-c66e92f020a391d461b594d6104f61a3abadb940.tar.gz |
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.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/scons-proc.py b/bin/scons-proc.py index 922ddd65..b8b12385 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 |