diff options
author | 2016-09-22 09:37:39 +0000 | |
---|---|---|
committer | 2016-09-22 09:37:39 +0000 | |
commit | bb8b1cb6af830b40f9be398d1e1bf8bdca772140 (patch) | |
tree | 87ca84797bced28ac715e49aacb6d4c07bbe264a /Lib/traceback.py | |
parent | Extend the test to lower pickle protocols. (diff) | |
download | cpython-bb8b1cb6af830b40f9be398d1e1bf8bdca772140.tar.gz cpython-bb8b1cb6af830b40f9be398d1e1bf8bdca772140.tar.bz2 cpython-bb8b1cb6af830b40f9be398d1e1bf8bdca772140.zip |
Issue #27348: Restore “Exception: None” formatting in traceback module
This fixes a regression caused by revision 73afda5a4e4c. Also reverts the
decimal test workaround added in revision 5f3dd0a2b1ab.
Remove test_without_exception(). According to revision ecaafc32c500, this was
added in Python 2 so that print_exc() would output “None” when called with no
exception set. However print_exc() never worked like this in Python 3, and
the use case is not documented.
Restore TracebackCases class name (instead of SyntaxTracebackCases), because
the class also tests other exceptions.
Diffstat (limited to 'Lib/traceback.py')
-rw-r--r-- | Lib/traceback.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/traceback.py b/Lib/traceback.py index a2eb539c025..c5fd61716c7 100644 --- a/Lib/traceback.py +++ b/Lib/traceback.py @@ -140,7 +140,7 @@ def format_exception_only(etype, value): def _format_final_exc_line(etype, value): valuestr = _some_str(value) - if value == 'None' or value is None or not valuestr: + if value is None or not valuestr: line = "%s\n" % etype else: line = "%s: %s\n" % (etype, valuestr) |