summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-07-28 19:14:08 +0300
committerAlon Levy <alevy@redhat.com>2011-07-28 19:14:08 +0300
commite4a983f3365514c62151fe3704c1bade1b547ccf (patch)
tree63c5031cd087bb81b9e95ad7716a9e0a2c63ad4d
parent8feab23872993ae2b97c85170ede32306002e835 (diff)
qemu-img: use subprocess instead of os.popen
-rwxr-xr-xspice23
1 files changed, 2 insertions, 1 deletions
diff --git a/spice2 b/spice2
index e05ec07..b3af347 100755
--- a/spice2
+++ b/spice2
@@ -274,7 +274,8 @@ def get_temp_name(prefix, postfix):
def create_qcow_with_backing_file(target_base, backing_file, erase_at_exit):
filename = get_temp_name(target_base, '.qcow2')
- os.system('qemu-img create -f qcow2 -o backing_file="%s" %s' % (backing_file, filename))
+ subprocess.call(['qemu-img', 'create', '-f', 'qcow2', '-o', 'backing_file=%s' % backing_file,
+ filename])
if erase_at_exit:
temp_files.append(filename)
return filename