Skip to content

Commit cd8ef82

Browse files
committed
test: stop logging warnings in run_cmd if exception is thrown
If the exception ends up being fatal, then it will get printed in full anyway, and it contains the entire log message anyway, and we just end up with duplicate messages. If its not fatal (e.g. caught), then its arguably up to the caller to decide whether it should be logged. Signed-off-by: Patrick Roy <[email protected]>
1 parent 3c048fe commit cd8ef82

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

tests/framework/utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,6 @@ def run_cmd(cmd, check=False, shell=True, cwd=None, timeout=None) -> CommandRetu
415415

416416
# If a non-zero return code was thrown, raise an exception
417417
if check and proc.returncode != 0:
418-
CMDLOG.warning("Command failed: %s\n", output_message)
419-
420418
raise ChildProcessError(output_message)
421419

422420
CMDLOG.debug(output_message)

0 commit comments

Comments
 (0)