From 158076d0a25c790b105ef8bd39267b487426de48 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Sat, 7 Apr 2012 01:26:34 +0200 Subject: [PATCH] dom0/core: minor netvm switching Do not fail when setting netvm to none of running VM. --- dom0/qvm-core/qubes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom0/qvm-core/qubes.py b/dom0/qvm-core/qubes.py index df7ab82e..6e71f93f 100755 --- a/dom0/qvm-core/qubes.py +++ b/dom0/qvm-core/qubes.py @@ -377,7 +377,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)