From efa038197d03b5304a0daa677f60733792d03223 Mon Sep 17 00:00:00 2001 From: Sanne Raymaekers Date: Tue, 4 Apr 2023 10:31:36 +0200 Subject: [PATCH] stages/org.osbuild.ovf: support older python3 versions The `capture_output` option was added in python3.7, yet el8 has python3.6 by default. --- stages/org.osbuild.ovf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stages/org.osbuild.ovf b/stages/org.osbuild.ovf index 49b2cecc..c14f3562 100755 --- a/stages/org.osbuild.ovf +++ b/stages/org.osbuild.ovf @@ -117,7 +117,7 @@ OVF_TEMPLATE = """ def virtual_size(vmdk): cmd = ["qemu-img", "info", "--output=json", vmdk] - res = subprocess.run(cmd, check=True, capture_output=True) + res = subprocess.run(cmd, check=True, stdout=subprocess.PIPE, encoding="utf8") if res.returncode != 0: raise RuntimeError("Unable to determine vmdk size") return json.loads(res.stdout)["virtual-size"]