diff --git a/qubes/vm/mix/net.py b/qubes/vm/mix/net.py index 85d06dd2..0562d131 100644 --- a/qubes/vm/mix/net.py +++ b/qubes/vm/mix/net.py @@ -412,7 +412,8 @@ class NetVMMixin(qubes.events.Emitter): 'Cannot dynamically attach to stopped NetVM: {!r}'.format( newvalue)) - if oldvalue is not None: + # don't check oldvalue, because it's missing if it was default + if self.netvm is not None: if self.is_running(): self.detach_network()