mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Add obvious needed else clause to format_exception().
This commit is contained in:
parent
2e6938f167
commit
3f0666c4a2
1 changed files with 2 additions and 0 deletions
|
@ -87,6 +87,8 @@ def format_exception(etype, value, tb, limit = None):
|
|||
if tb:
|
||||
list = ['Traceback (innermost last):\n']
|
||||
list = list + format_tb(tb, limit)
|
||||
else:
|
||||
list = []
|
||||
list = list + format_exception_only(etype, value)
|
||||
return list
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue