diff --git a/test/run/test_mount.py b/test/run/test_mount.py index 634fba1c..939add64 100755 --- a/test/run/test_mount.py +++ b/test/run/test_mount.py @@ -163,7 +163,7 @@ def test_all_options(tmpdir): assert st.st_gid == 0 shortname_tested = False - proc = subprocess.run("mount", capture_output=True, check=True) + proc = subprocess.run("mount", stdout=subprocess.PIPE, check=True) for line in proc.stdout.splitlines(): strline = line.decode("utf-8") if mountpoint in strline: diff --git a/test/run/test_stages.py b/test/run/test_stages.py index 8ff0b62a..476625d6 100644 --- a/test/run/test_stages.py +++ b/test/run/test_stages.py @@ -325,7 +325,7 @@ class TestStages(test.TestBase): qemu_img_run = subprocess.run( ["qemu-img", "info", "--output=json", ip], - capture_output=True, + stdout=subprocess.PIPE, check=True, encoding="utf8" ) @@ -490,7 +490,7 @@ class TestStages(test.TestBase): assert ovf_tree_file.attrib["{http://schemas.dmtf.org/ovf/envelope/1}size"] == str(os.stat(vmdk).st_size) ovf_tree_disk = ovf_tree_root[1][1] - res = subprocess.run(["qemu-img", "info", "--output=json", vmdk], check=True, capture_output=True) + res = subprocess.run(["qemu-img", "info", "--output=json", vmdk], check=True, stdout=subprocess.PIPE) capacity = ovf_tree_disk.attrib["{http://schemas.dmtf.org/ovf/envelope/1}capacity"] assert capacity == str(json.loads(res.stdout)["virtual-size"]) pop_size = ovf_tree_disk.attrib["{http://schemas.dmtf.org/ovf/envelope/1}populatedSize"] diff --git a/tools/osbuild-mpp b/tools/osbuild-mpp index 8ac86346..81e4f654 100755 --- a/tools/osbuild-mpp +++ b/tools/osbuild-mpp @@ -360,7 +360,7 @@ class ImageManifest: src = f"docker://{imagename}" res = subprocess.run(["skopeo", "inspect", "--raw", src], - capture_output=True, + stdout=subprocess.PIPE, check=True) m = ImageManifest(res.stdout) m.name = imagename