Skip to content

Commit

Permalink
Use getattr() to access Qubes properties
Browse files Browse the repository at this point in the history
This avoids a traceback from qubesd if one tries to use a DispVM as the
template for a DispVM.

Fixes QubesOS/qubes-issues#6685.
  • Loading branch information
DemiMarie committed Jun 17, 2021
1 parent 9e39f1d commit e4016a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qubes/vm/dispvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def from_appvm(cls, appvm, **kwargs):
This method modifies :file:`qubes.xml` file.
The qube returned is not started.
'''
if not appvm.template_for_dispvms:
if not getattr(appvm, 'template_for_dispvms', False):
raise qubes.exc.QubesException(
'Refusing to create DispVM out of this AppVM, because '
'template_for_dispvms=False')
Expand Down

0 comments on commit e4016a1

Please sign in to comment.