Browse Source

qubes: fix instantiating with no or empty qubes.xml

There is always dom0 (domid=0) added, but it has None as self.xml.
Wojtek Porczyk 8 years ago
parent
commit
e4a0cfc8c8
1 changed files with 2 additions and 0 deletions
  1. 2 0
      qubes/__init__.py

+ 2 - 0
qubes/__init__.py

@@ -912,6 +912,8 @@ class PropertyHolder(qubes.events.Emitter):
         :param int load_stage: Stage of loading.
         '''
 
+        if self.xml is None:
+            return
         all_names = set(
             prop.__name__ for prop in self.property_list(load_stage))
         for node in self.xml.xpath('./properties/property'):