qubes.py: handle nicely situation when create_appmenus exits with error
This commit is contained in:
parent
a09cef1027
commit
304c27313a
@ -1609,11 +1609,14 @@ class QubesAppVm(QubesVm):
|
||||
if source_template is None:
|
||||
source_template = self.template_vm
|
||||
|
||||
try:
|
||||
if source_template is not None:
|
||||
subprocess.check_call ([qubes_appmenu_create_cmd, source_template.appmenus_templates_dir, self.name])
|
||||
else:
|
||||
# Only add apps to menu
|
||||
subprocess.check_call ([qubes_appmenu_create_cmd, "none", self.name])
|
||||
except subprocess.CalledProcessError:
|
||||
print "Ooops, there was a problem creating appmenus for {0} VM!".format (self.name)
|
||||
|
||||
|
||||
class QubesVmCollection(dict):
|
||||
|
Loading…
Reference in New Issue
Block a user