Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Stourac <[email protected]>
  • Loading branch information
jiridanek and jstourac authored Mar 3, 2024
1 parent 6160e01 commit 79c1125
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion ods_ci/selftests/utils/scripts/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ def test_stderr(self):
def test_string_cmd(self):
assert util.execute_command("echo hello world", print_stdout=False) == "hello world\n"

def test_list_cmd(self):
def test_list_cmd_single_list_item(self):
assert util.execute_command(["echo hello world"], print_stdout=False) == "hello world\n"

def test_list_cmd_multiple_list_items(self):
# this is surprising, but it's what subprocess.Popen does
assert util.execute_command(["echo", "hello", "world"], print_stdout=False) == "\n"

Expand Down
2 changes: 1 addition & 1 deletion ods_ci/utils/scripts/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def execute_command(cmd, print_stdout=True):
sys.stdout.flush()
return "".join(output)
except Exception as e:
log.exception("Starting the subprocess failed", exc_info=e)
log.exception(f"Starting the subprocess '{cmd}' failed", exc_info=e)
return None


Expand Down

0 comments on commit 79c1125

Please sign in to comment.