1
0
mirror of https://github.com/ARM-software/devlib.git synced 2024-10-06 02:40:50 +01:00

exception/get_traceback: Fix type error

Passing a `BytesIO` object to `print_tb` returns a `TypeError` change
this to a `StringIO` object instead.
This commit is contained in:
Marc Bonnici 2019-12-05 13:33:17 +00:00 committed by setrofim
parent abd88548d2
commit f303d1326b

View File

@ -133,7 +133,7 @@ def get_traceback(exc=None):
if not exc:
return None
tb = exc[2]
sio = io.BytesIO()
sio = io.StringIO()
traceback.print_tb(tb, file=sio)
del tb # needs to be done explicitly see: http://docs.python.org/2/library/sys.html#sys.exc_info
return sio.getvalue()