Forráskód Böngészése

qubes: make 'store' property public (R/O)

It makes sense to see from what Qubes object was loaded.
Marek Marczykowski-Górecki 8 éve
szülő
commit
ad1f1738fa
2 módosított fájl, 4 hozzáadás és 2 törlés
  1. 3 0
      qubes/__init__.py
  2. 1 2
      qubes/backup.py

+ 3 - 0
qubes/__init__.py

@@ -1224,6 +1224,9 @@ class Qubes(PropertyHolder):
 
         self.events_enabled = True
 
+    @__builtin__.property
+    def store(self):
+        return self._store
 
     def load(self):
         '''Open qubes.xml

+ 1 - 2
qubes/backup.py

@@ -575,8 +575,7 @@ class Backup(object):
     def backup_do(self):
         if self.passphrase is None:
             raise qubes.exc.QubesException("No passphrase set")
-        # noinspection PyProtectedMember
-        qubes_xml = self.app._store
+        qubes_xml = self.app.store
         self.tmpdir = tempfile.mkdtemp()
         shutil.copy(qubes_xml, os.path.join(self.tmpdir, 'qubes.xml'))
         qubes_xml = os.path.join(self.tmpdir, 'qubes.xml')