Fix checking if there is AppVMs based on template (#154)
This commit is contained in:
parent
c2498a33e2
commit
ffaa518c5a
@ -1776,7 +1776,7 @@ class QubesVmCollection(dict):
|
||||
|
||||
def get_vms_based_on(self, template_qid):
|
||||
vms = set([vm for vm in self.values()
|
||||
if (vm.is_appvm() and vm.template_vm.qid == template_qid)])
|
||||
if (vm.template_vm and vm.template_vm.qid == template_qid)])
|
||||
return vms
|
||||
|
||||
def get_vms_connected_to(self, netvm_qid):
|
||||
|
@ -48,7 +48,7 @@ def main():
|
||||
print "The following AppVMs use '{0}' as a template:".format(vmname)
|
||||
for vm in dependent_vms:
|
||||
print "{name:<12} (qid={qid})".format(qid=vm.qid, name=vm.name)
|
||||
print "Please remove those VMs first, or use the --force option."
|
||||
print "Please remove those VMs first."
|
||||
exit (1)
|
||||
if qvm_collection.default_template_qid == vm.qid:
|
||||
qvm_collection.default_template_qid = None
|
||||
|
Loading…
Reference in New Issue
Block a user