Commit 662f421c by Szeberényi Imre

Update disk.py

parent b2bea118
...@@ -104,7 +104,7 @@ class Disk(object): ...@@ -104,7 +104,7 @@ class Disk(object):
""" Create disk from path """ Create disk from path
""" """
path = os.path.realpath(dir + '/' + name) path = os.path.realpath(dir + '/' + name)
output = subprocess.check_output(['qemu-img', 'info', path]) output = subprocess.check_output(['qemu-img', 'info', '--force', path])
type = 'normal' type = 'normal'
base_name = None base_name = None
...@@ -127,7 +127,7 @@ class Disk(object): ...@@ -127,7 +127,7 @@ class Disk(object):
"""Create disk from path.""" """Create disk from path."""
path = os.path.realpath(dir + '/' + name) path = os.path.realpath(dir + '/' + name)
output = subprocess.check_output( output = subprocess.check_output(
['qemu-img', 'info', '--output=json', path]) ['qemu-img', 'info', '--force', '--output=json', path])
disk_info = json.loads(output) disk_info = json.loads(output)
name = name name = name
format = disk_info.get('format') format = disk_info.get('format')
......
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