diff options
author | Alon Levy <alevy@redhat.com> | 2011-07-28 19:14:08 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2011-07-28 19:14:08 +0300 |
commit | e4a983f3365514c62151fe3704c1bade1b547ccf (patch) | |
tree | 63c5031cd087bb81b9e95ad7716a9e0a2c63ad4d | |
parent | 8feab23872993ae2b97c85170ede32306002e835 (diff) |
qemu-img: use subprocess instead of os.popen
-rwxr-xr-x | spice2 | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |