audio/gui: use simply vm.tags instead of list()

This commit is contained in:
Frédéric Pierret (fepitre) 2020-03-08 10:27:25 +01:00
parent 4b5ae0833b
commit 9051aff15a
No known key found for this signature in database
GPG Key ID: 484010B5CDC576E2
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ class AUDIO(qubes.ext.Extension):
@qubes.ext.handler('domain-init', 'domain-load')
def on_domain_init_load(self, vm, event):
if getattr(vm, 'audiovm', None):
if 'audiovm-' + vm.audiovm.name not in list(vm.tags):
if 'audiovm-' + vm.audiovm.name not in vm.tags:
self.on_property_set(vm, event, name='audiovm',
newvalue=vm.audiovm)

View File

@ -52,7 +52,7 @@ class GUI(qubes.ext.Extension):
@qubes.ext.handler('domain-init', 'domain-load')
def on_domain_init_load(self, vm, event):
if getattr(vm, 'guivm', None):
if 'guivm-' + vm.guivm.name not in list(vm.tags):
if 'guivm-' + vm.guivm.name not in vm.tags:
self.on_property_set(vm, event, name='guivm', newvalue=vm.guivm)
# property-del <=> property-reset-to-default