Skip to content

Commit

Permalink
qvm-template: Use "vm.features.get" instead of explicit membership ch…
Browse files Browse the repository at this point in the history
…eck.
  • Loading branch information
WillyPillow committed Aug 3, 2020
1 parent 582c876 commit e482b9e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions qubesadmin/tools/qvm_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,7 @@ def query_local_evr(vm):
vm.features['template-release'])

def is_managed_template(vm):
return 'template-name' in vm.features \
and vm.name == vm.features['template-name']
return vm.features.get('template-name', None) == vm.name

def get_managed_template_vm(app, name):
if name not in app.domains:
Expand Down

0 comments on commit e482b9e

Please sign in to comment.