stages/org.osbuild.ovf: support older python3 versions
The `capture_output` option was added in python3.7, yet el8 has python3.6 by default.
This commit is contained in:
parent
76a80bd8c5
commit
efa038197d
1 changed files with 1 additions and 1 deletions
|
|
@ -117,7 +117,7 @@ OVF_TEMPLATE = """<?xml version="1.0"?>
|
|||
|
||||
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"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue