dom0/core: minor netvm switching
Do not fail when setting netvm to none of running VM.
This commit is contained in:
parent
1e9cad6498
commit
96756fa1fa
@ -385,7 +385,7 @@ class QubesVm(object):
|
||||
self._set_netvm(new_netvm)
|
||||
|
||||
def _set_netvm(self, new_netvm):
|
||||
if self.is_running() and not new_netvm.is_running():
|
||||
if self.is_running() and new_netvm is not None and not new_netvm.is_running():
|
||||
raise QubesException("Cannot dynamically attach to stopped NetVM")
|
||||
if self.netvm is not None:
|
||||
self.netvm.connected_vms.pop(self.qid)
|
||||
|
Loading…
Reference in New Issue
Block a user