Skip to content

Commit

Permalink
Do not try reading "old" property value when loading them from XML
Browse files Browse the repository at this point in the history
When loading properties from XML, events are disabled. Do not try to
retrieve old property value that would be used only for sending an
event. Due to dependencies between properties, it may not be possible
yet.

Theoretically, some of such issues could be solved by shuffling
properties between load stages, but there are many layers of inter VM
dependencies (TemplateVM->AppVM, netvm, guivm, default_dispvm etc) and
solving them all at once might not be possible in some configurations.

Fixes QubesOS/qubes-issues#6998

(cherry picked from commit b6a0b40)
  • Loading branch information
marmarek committed May 13, 2023
1 parent f8a78a5 commit 6478602
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions qubes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,11 @@ def __set__(self, instance, value):
return

try:
oldvalue = getattr(instance, self.__name__)
has_oldvalue = True
if instance.events_enabled:
oldvalue = getattr(instance, self.__name__)
has_oldvalue = True
else:
has_oldvalue = False
except AttributeError:
has_oldvalue = False

Expand Down

0 comments on commit 6478602

Please sign in to comment.