qubes: fix deleting domain
This commit is contained in:
parent
0dc0fd306f
commit
d693964ab9
@ -1375,16 +1375,18 @@ class Qubes(PropertyHolder):
|
|||||||
@qubes.events.handler('domain-deleted')
|
@qubes.events.handler('domain-deleted')
|
||||||
def on_domain_deleted(self, event, vm):
|
def on_domain_deleted(self, event, vm):
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
if self.default_netvm == vm:
|
for propname in (
|
||||||
del self.default_netvm
|
'default_netvm',
|
||||||
if self.default_fw_netvm == vm:
|
'default_fw_netvm',
|
||||||
del self.default_fw_netvm
|
'clockvm',
|
||||||
if self.clockvm == vm:
|
'updatevm',
|
||||||
del self.clockvm
|
'default_template',
|
||||||
if self.updatevm == vm:
|
):
|
||||||
del self.updatevm
|
try:
|
||||||
if self.default_template == vm:
|
if getattr(self, propname) == vm:
|
||||||
del self.default_template
|
delattr(self, propname)
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
@qubes.events.handler('property-pre-set:clockvm')
|
@qubes.events.handler('property-pre-set:clockvm')
|
||||||
|
Loading…
Reference in New Issue
Block a user