From: Fred Drake Date: Thu, 3 May 2001 04:58:49 +0000 (+0000) Subject: InteractiveInterpreter.showsyntaxerror(): X-Git-Tag: v2.2a3~1922 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c7745d4b54f020e60ad3b56efd6e775d9d4873d4;p=thirdparty%2FPython%2Fcpython.git InteractiveInterpreter.showsyntaxerror(): When replacing the exception object, be sure we stuff the new value in sys.last_value (which we already did for the original value). --- diff --git a/Lib/code.py b/Lib/code.py index ab1050c12e7c..d56681c9e623 100644 --- a/Lib/code.py +++ b/Lib/code.py @@ -137,6 +137,7 @@ class InteractiveInterpreter: except: # If that failed, assume SyntaxError is a string value = msg, (filename, lineno, offset, line) + sys.last_value = value list = traceback.format_exception_only(type, value) map(self.write, list)