mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-18 12:06:08 +00:00
utils/log: Ensure to convert all arguments to strings
Ensure that all arguments provided for an Exception are converted to stings before attempting to join them for debug information.
This commit is contained in:
parent
7c3054b54b
commit
375a36c155
@ -200,7 +200,7 @@ def log_error(e, logger, critical=False):
|
||||
log_func(tb)
|
||||
command = e.cmd
|
||||
if e.args:
|
||||
command = '{} {}'.format(command, ' '.join(e.args))
|
||||
command = '{} {}'.format(command, ' '.join(map(str, e.args)))
|
||||
message = 'Command \'{}\' returned non-zero exit status {}\nOUTPUT:\n{}\n'
|
||||
log_func(message.format(command, e.returncode, e.output))
|
||||
elif isinstance(e, SyntaxError):
|
||||
|
Loading…
x
Reference in New Issue
Block a user