mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-22 18:07:12 +01:00
Utils.ex_stack is the same as traceback.format_exc as we are no longer on Python 2.3
This commit is contained in:
parent
08a39b7b19
commit
3ced4c6695
@ -399,12 +399,12 @@ def num2ver(ver):
|
||||
def ex_stack():
|
||||
"""
|
||||
Extract the stack to display exceptions
|
||||
Deprecated: use traceback.format_exc()
|
||||
|
||||
:return: a string represening the last exception
|
||||
"""
|
||||
exc_type, exc_value, tb = sys.exc_info()
|
||||
exc_lines = traceback.format_exception(exc_type, exc_value, tb)
|
||||
return ''.join(exc_lines)
|
||||
# TODO remove in waf 2.0
|
||||
return traceback.format_exc()
|
||||
|
||||
def to_list(sth):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user