Skip to content

Commit

Permalink
fixed write command to not return error string
Browse files Browse the repository at this point in the history
  • Loading branch information
a-dubs committed Aug 15, 2023
1 parent 6d74db9 commit 8a4af19
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion cloudinit/cmd/devel/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ def _write_command_output_to_file(cmd, filename, msg, verbosity):
except ProcessExecutionError as e:
write_file(filename, str(e))
_debug("collecting %s failed.\n" % msg, 1, verbosity)
return str(e)
else:
_debug("collected %s\n" % msg, 1, verbosity)
return output
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/cmd/devel/test_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def test_write_command_output_to_file(self, m_getuid, tmpdir):

assert test_str + "\n" == return_output1
assert test_str + "\n" == load_file(output_file1)
assert expected_stderr == return_output2
assert None == return_output2
assert expected_stderr == load_file(output_file2)

def test_stream_command_output_to_file(self, m_getuid, tmpdir):
Expand Down

0 comments on commit 8a4af19

Please sign in to comment.