core: Fix creation of template-based HVM
This commit is contained in:
parent
8e94099e12
commit
ca1be8683c
@ -1242,10 +1242,11 @@ class QubesVm(object):
|
|||||||
if os.path.exists (self.volatile_img):
|
if os.path.exists (self.volatile_img):
|
||||||
os.remove (self.volatile_img)
|
os.remove (self.volatile_img)
|
||||||
|
|
||||||
retcode = subprocess.call (["tar", "xf", source_template.clean_volatile_img, "-C", self.dir_path])
|
if hasattr(source_template, 'clean_volatile_img'):
|
||||||
if retcode != 0:
|
retcode = subprocess.call (["tar", "xf", source_template.clean_volatile_img, "-C", self.dir_path])
|
||||||
raise IOError ("Error while unpacking {0} to {1}".\
|
if retcode != 0:
|
||||||
format(source_template.clean_volatile_img, self.volatile_img))
|
raise IOError ("Error while unpacking {0} to {1}".\
|
||||||
|
format(source_template.clean_volatile_img, self.volatile_img))
|
||||||
|
|
||||||
def remove_from_disk(self):
|
def remove_from_disk(self):
|
||||||
if dry_run:
|
if dry_run:
|
||||||
|
Loading…
Reference in New Issue
Block a user