Commit 731fb5d5 by Máhonfai Bálint

Fix merge conflict

parent d9aafb6f
import json import json
import shutil
import os import os
import subprocess import subprocess
import logging import logging
...@@ -287,12 +289,18 @@ class Disk(object): ...@@ -287,12 +289,18 @@ class Disk(object):
meta={'percent': percent} meta={'percent': percent}
) )
cmdline = ['qemu-img', with magic.Magic() as m:
'convert', ftype = m.id_filename(downloaded_file)
'-O', 'qcow2',
downloaded_file, if 'qcow' in ftype.lower():
self.get_path()] shutil.move(downloaded_file, self.get_path())
subprocess.check_output(cmdline) else:
cmdline = ['qemu-img',
'-O', 'qcow2',
except AbortException: except AbortException:
os.unlink(downloaded_file) os.unlink(downloaded_file)
if os.path.exists(self.get_path()): if os.path.exists(self.get_path()):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment