From 9cc86b3be2a424e1bead99c59bbd2fd8ba19d2ec Mon Sep 17 00:00:00 2001 From: qubesuser Date: Thu, 9 Nov 2017 18:42:44 +0100 Subject: [PATCH] don't access netvm if it's None in visible_gateway/netmask Causes an unnecessary exception --- qubes/vm/mix/net.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qubes/vm/mix/net.py b/qubes/vm/mix/net.py index 7b09ff9f..5eea268c 100644 --- a/qubes/vm/mix/net.py +++ b/qubes/vm/mix/net.py @@ -123,13 +123,13 @@ class NetVMMixin(qubes.events.Emitter): def visible_gateway(self): '''Default gateway of this domain as seen by the domain.''' return self.features.check_with_template('net.fake-gateway', None) or \ - self.netvm.gateway + (self.netvm.gateway if self.netvm else None) @qubes.stateless_property def visible_netmask(self): '''Netmask as seen by the domain.''' return self.features.check_with_template('net.fake-netmask', None) or \ - self.netvm.netmask + (self.netvm.netmask if self.netvm else None) # # used in netvms (provides_network=True)