Skip to content

Commit ea67828

Browse files
committed
Fix outdated status on disposable template shutdown
1 parent 203be8c commit ea67828

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

qui/tray/domains.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,10 @@ def remove_domain_item(self, _submitter, _event, vm, **_kwargs):
997997

998998
def handle_domain_shutdown(self, vm):
999999
try:
1000-
if getattr(vm, "klass", None) == "TemplateVM":
1000+
if (
1001+
getattr(vm, 'klass', None) == 'TemplateVM'
1002+
or getattr(vm, 'template_for_dispvms', False)
1003+
):
10011004
for menu_item in self.menu_items.values():
10021005
try:
10031006
if not menu_item.vm.is_running():
@@ -1006,7 +1009,9 @@ def handle_domain_shutdown(self, vm):
10061009
continue
10071010
except exc.QubesPropertyAccessError:
10081011
continue
1009-
if getattr(menu_item.vm, "template", None) == vm and any(
1012+
template1 = getattr(menu_item.vm, "template", None)
1013+
template2 = getattr(template1, "template", None)
1014+
if vm in (template1, template2) and any(
10101015
vol.is_outdated()
10111016
for vol in menu_item.vm.volumes.values()
10121017
):

0 commit comments

Comments
 (0)