Don't try to write to qubesdb of an offline VM

This commit is contained in:
Pawel Marczewski 2020-01-09 12:37:43 +01:00
parent 7597a50b20
commit 6bf230cf4d
No known key found for this signature in database
GPG Key ID: DE42EE9B14F96465

View File

@ -446,13 +446,14 @@ class NetVMMixin(qubes.events.Emitter):
''' '''
# pylint: disable=unused-argument # pylint: disable=unused-argument
if oldvalue is not None: if oldvalue is not None and oldvalue.is_running():
oldvalue.reload_connected_ips() oldvalue.reload_connected_ips()
if newvalue is None: if newvalue is None:
return return
newvalue.reload_connected_ips() if newvalue.is_running():
newvalue.reload_connected_ips()
if self.is_running(): if self.is_running():
# refresh IP, DNS etc # refresh IP, DNS etc