mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00: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:
parent
abd88548d2
commit
f303d1326b
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user