appmenus: recreate child VM appmenus after template update

For example refresh the icons, or commands.
This commit is contained in:
Marek Marczykowski-Górecki 2014-02-22 01:26:01 +01:00
parent 849b8450ce
commit 0c1e45cb3d

View File

@ -262,4 +262,12 @@ def main():
os.path.basename(system_path['appmenu_start_hvm_template']))): os.path.basename(system_path['appmenu_start_hvm_template']))):
shutil.copy(system_path['appmenu_start_hvm_template'], vm.appmenus_templates_dir) shutil.copy(system_path['appmenu_start_hvm_template'], vm.appmenus_templates_dir)
if hasattr(vm, 'appvms'):
for child_vm in vm.appvms.values():
try:
child_vm.appmenus_recreate()
except Exception, e:
print >> sys.stderr, "---> Failed to recreate appmenus for " \
"'{0}': {1}".format(child_vm.name, str(e))
main() main()