qubes: Fix error in get_vms_based_on()
Not every vm has .template attribute.
This commit is contained in:
parent
d766b8e110
commit
e0210130da
@ -489,7 +489,8 @@ class VMCollection(object):
|
||||
|
||||
def get_vms_based_on(self, template):
|
||||
template = self[template]
|
||||
return set(vm for vm in self if vm.template == template)
|
||||
return set(vm for vm in self
|
||||
if hasattr(vm, 'template') and vm.template == template)
|
||||
|
||||
|
||||
def get_vms_connected_to(self, netvm):
|
||||
|
Loading…
Reference in New Issue
Block a user