Skip to content

Commit

Permalink
Make sure to include stderr when gathering output of stratis tools
Browse files Browse the repository at this point in the history
Without this we won't get any error message when the call fails.
  • Loading branch information
vojtechtrefny committed Apr 18, 2024
1 parent 6ab86cb commit 7563fbe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions blivet/devicelibs/stratis.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def pool_used(dev_sizes, encrypted=False):
if encrypted:
cmd.append("--encrypted")

rc, out = util.run_program_and_capture_output(cmd)
rc, out = util.run_program_and_capture_output(cmd, stderr_to_stdout=True)
if rc:
raise StratisError("Failed to predict usage for stratis pool")

Expand All @@ -78,7 +78,8 @@ def filesystem_md_size(fs_size):

rc, out = util.run_program_and_capture_output([availability.STRATISPREDICTUSAGE_APP.name, "filesystem",
"--filesystem-size",
str(fs_size.get_bytes())])
str(fs_size.get_bytes())],
stderr_to_stdout=True)
if rc:
raise StratisError("Failed to predict usage for stratis filesystem: %s" % out)

Expand Down

0 comments on commit 7563fbe

Please sign in to comment.