diff options
author | Fred Drake <fdrake@acm.org> | 2001-05-03 04:58:49 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-05-03 04:58:49 (GMT) |
commit | c7745d4b54f020e60ad3b56efd6e775d9d4873d4 (patch) | |
tree | 54debc47f8aefdc0f5632b00fa077d3cff7017f2 | |
parent | a7cc69e02ef9ec7014600911a66978898e545cf1 (diff) | |
download | cpython-c7745d4b54f020e60ad3b56efd6e775d9d4873d4.zip cpython-c7745d4b54f020e60ad3b56efd6e775d9d4873d4.tar.gz cpython-c7745d4b54f020e60ad3b56efd6e775d9d4873d4.tar.bz2 |
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).
-rw-r--r-- | Lib/code.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/code.py b/Lib/code.py index ab1050c..d56681c 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) |