mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-06-23 00:35:56 +01: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:
@ -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):
|
||||
|
Reference in New Issue
Block a user