appmenus: fix the code for creating standalone VMs
... without source template. Especially HVM and HVM template.
This commit is contained in:
parent
b7bfb69d78
commit
9313be30ff
@ -102,14 +102,14 @@ def QubesVm_create_on_disk(self, verbose, source_template):
|
|||||||
source_whitelist_filename = 'vm-' + vm_files["appmenus_whitelist"]
|
source_whitelist_filename = 'vm-' + vm_files["appmenus_whitelist"]
|
||||||
if self.is_netvm():
|
if self.is_netvm():
|
||||||
source_whitelist_filename = 'netvm-' + vm_files["appmenus_whitelist"]
|
source_whitelist_filename = 'netvm-' + vm_files["appmenus_whitelist"]
|
||||||
if os.path.exists(os.path.join(source_template.dir_path, source_whitelist_filename)):
|
if source_template and os.path.exists(os.path.join(source_template.dir_path, source_whitelist_filename)):
|
||||||
if verbose:
|
if verbose:
|
||||||
print >> sys.stderr, "--> Creating default whitelisted apps list: {0}".\
|
print >> sys.stderr, "--> Creating default whitelisted apps list: {0}".\
|
||||||
format(self.dir_path + '/' + vm_files["whitelisted_appmenus"])
|
format(self.dir_path + '/' + vm_files["whitelisted_appmenus"])
|
||||||
shutil.copy(os.path.join(source_template.dir_path, source_whitelist_filename),
|
shutil.copy(os.path.join(source_template.dir_path, source_whitelist_filename),
|
||||||
os.path.join(self.dir_path, vm_files["whitelisted_appmenus"]))
|
os.path.join(self.dir_path, vm_files["whitelisted_appmenus"]))
|
||||||
|
|
||||||
if self.updateable:
|
if source_template and self.updateable:
|
||||||
if verbose:
|
if verbose:
|
||||||
print >> sys.stderr, "--> Copying the template's appmenus templates dir:\n{0} ==>\n{1}".\
|
print >> sys.stderr, "--> Copying the template's appmenus templates dir:\n{0} ==>\n{1}".\
|
||||||
format(source_template.appmenus_templates_dir, self.appmenus_templates_dir)
|
format(source_template.appmenus_templates_dir, self.appmenus_templates_dir)
|
||||||
|
Loading…
Reference in New Issue
Block a user