mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #27348: Merge exception formatting fix from 3.5 into 3.6
This commit is contained in:
commit
f3b0639417
4 changed files with 18 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue