mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 02:01:16 +00:00
utils/log: Convert exception to string before passing to Logger
Now that we add an event when logging errors, we need to avoid passing an exception object directly to the logger. Otherwise we end up adding the unserializable Exception object to the events list, which causes an error when trying to write the output.
This commit is contained in:
parent
b11bd6cf12
commit
4b7d43de9e
@ -171,7 +171,7 @@ def log_error(e, logger, critical=False):
|
||||
if isinstance(e, KeyboardInterrupt):
|
||||
log_func('Got CTRL-C. Aborting.')
|
||||
elif isinstance(e, WAError) or isinstance(e, DevlibError):
|
||||
log_func(e)
|
||||
log_func(str(e))
|
||||
elif isinstance(e, subprocess.CalledProcessError):
|
||||
tb = get_traceback()
|
||||
log_func(tb)
|
||||
|
Loading…
x
Reference in New Issue
Block a user