2
0
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:
Thomas Nagy 2016-02-28 12:23:18 +01:00
parent 08a39b7b19
commit 3ced4c6695
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64

View File

@ -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):
"""