qubes.py: handle nicely situation when create_appmenus exits with error

This commit is contained in:
Joanna Rutkowska 2011-04-08 15:50:01 +02:00
parent a09cef1027
commit 304c27313a

View File

@ -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):