Răsfoiți Sursa

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 ani în urmă
părinte
comite
e4a0cfc8c8
1 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  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'):