forked from p15670423/monkey
Common: Fix error logging for wait_commands
* Add Timer TODO
This commit is contained in:
parent
587331dbdb
commit
adea9cc2a7
|
@ -79,7 +79,7 @@ class CmdRunner(object):
|
||||||
curr_time = init_time
|
curr_time = init_time
|
||||||
|
|
||||||
results = []
|
results = []
|
||||||
|
# TODO: Use timer.Timer
|
||||||
while (curr_time - init_time < timeout) and (len(commands) != 0):
|
while (curr_time - init_time < timeout) and (len(commands) != 0):
|
||||||
for command in list(
|
for command in list(
|
||||||
commands
|
commands
|
||||||
|
@ -95,9 +95,8 @@ class CmdRunner(object):
|
||||||
for command, result in results:
|
for command, result in results:
|
||||||
if not result.is_success:
|
if not result.is_success:
|
||||||
logger.error(
|
logger.error(
|
||||||
"The following command failed: `%s`. status code: %s",
|
f"The command with id: {str(command.cmd_id)} failed. "
|
||||||
str(command[1]),
|
f"Status code: {str(result.status_code)}"
|
||||||
str(result.status_code),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return results
|
return results
|
||||||
|
|
Loading…
Reference in New Issue