qubes: fix network-related functions
- cleanup_vifs crash when non-networked VM is running - type error in get_vms_connected_to (store VM objects, not qid)
This commit is contained in:
parent
e85b0663f6
commit
28d4feb0d0
@ -487,9 +487,9 @@ class VMCollection(object):
|
||||
for vm in cur_vm.connected_vms:
|
||||
if vm in dependent_vms:
|
||||
continue
|
||||
dependent_vms.add(vm.qid)
|
||||
dependent_vms.add(vm)
|
||||
# if vm.is_netvm():
|
||||
new_vms.add(vm.qid)
|
||||
new_vms.add(vm)
|
||||
|
||||
return dependent_vms
|
||||
|
||||
|
@ -284,7 +284,7 @@ class NetVMMixin(qubes.events.Emitter):
|
||||
'''
|
||||
|
||||
dev_basepath = '/local/domain/%d/device/vif' % self.xid
|
||||
for dev in self.app.vmm.xs.ls('', dev_basepath):
|
||||
for dev in self.app.vmm.xs.ls('', dev_basepath) or []:
|
||||
# check if backend domain is alive
|
||||
backend_xid = int(self.app.vmm.xs.read('',
|
||||
'{}/{}/backend-id'.format(dev_basepath, dev)))
|
||||
|
Loading…
Reference in New Issue
Block a user