From 7563fbe923eb1b07e26ece8563d12638311b46b3 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Thu, 18 Apr 2024 16:14:07 +0200 Subject: [PATCH] Make sure to include stderr when gathering output of stratis tools Without this we won't get any error message when the call fails. --- blivet/devicelibs/stratis.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/blivet/devicelibs/stratis.py b/blivet/devicelibs/stratis.py index e813924e9..c6c713b84 100644 --- a/blivet/devicelibs/stratis.py +++ b/blivet/devicelibs/stratis.py @@ -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") @@ -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)