diff --git a/test/mod/test_util_lvm2.py b/test/mod/test_util_lvm2.py index 81fd8f34..53a50923 100644 --- a/test/mod/test_util_lvm2.py +++ b/test/mod/test_util_lvm2.py @@ -81,13 +81,13 @@ def list_vgs(): res = subprocess.run(cmd, check=False, stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, + stderr=subprocess.PIPE, encoding="UTF-8") data = res.stdout.strip() if res.returncode != 0: - msg = f"vgs: {data}" + msg = f"vgs: {res.stderr.strip()}" raise RuntimeError(msg) data = json.loads(data)