diff options
Diffstat (limited to 'src/engine/SCons/Script/SConscript.py')
-rw-r--r-- | src/engine/SCons/Script/SConscript.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/engine/SCons/Script/SConscript.py b/src/engine/SCons/Script/SConscript.py index 81450e9..074477f 100644 --- a/src/engine/SCons/Script/SConscript.py +++ b/src/engine/SCons/Script/SConscript.py @@ -270,7 +270,8 @@ def SConscript_exception(file=sys.stderr): This will show users who have Python errors where the problem is, without cluttering the output with all of the internal calls leading up to where we exec the SConscript.""" - stack = traceback.extract_tb(sys.exc_traceback) + exc_type, exc_value, exc_tb = sys.exc_info() + stack = traceback.extract_tb(exc_tb) last_text = "" found = 0 i = 0 @@ -284,10 +285,10 @@ def SConscript_exception(file=sys.stderr): # We did not find our exec statement, so this was actually a bug # in SCons itself. Show the whole stack. i = 0 - type = str(sys.exc_type) + type = str(exc_type) if type[:11] == "exceptions.": type = type[11:] - file.write('%s: %s:\n' % (type, sys.exc_value)) + file.write('%s: %s:\n' % (type, exc_value)) for fname, line, func, text in stack[i:]: file.write(' File "%s", line %d:\n' % (fname, line)) file.write(' %s\n' % text) |