Toggle installed_by_rpm in template tool

This commit is contained in:
Christopher Laprise 2018-01-02 01:19:06 -05:00
parent ac7461d1e8
commit f7d27cdcdc
No known key found for this signature in database
GPG Key ID: 448568C8B281C952

View File

@ -205,6 +205,7 @@ def post_install(args):
# if data import fails, remove half-created VM
del app.domains[vm.name]
raise
vm.installed_by_rpm = True
import_appmenus(vm, args.dir)
if not args.skip_start:
@ -226,6 +227,7 @@ def pre_remove(args):
for appvm in tpl.appvms:
parser.error('Qube {} uses this template'.format(appvm.name))
tpl.installed_by_rpm = False
del app.domains[args.name]
return 0