diff options
author | Joel Andres Granados <jgranado@redhat.com> | 2008-10-23 18:54:11 +0200 |
---|---|---|
committer | Joel Andres Granados <jgranado@redhat.com> | 2008-10-24 15:01:24 +0200 |
commit | 8d54d4fcd456b3d57c86d35a3dc2544d21c93ef4 (patch) | |
tree | 8f5a3212a80da3f84c8ed8b409ad7bff0a096107 /pyfirstaidkit | |
parent | 2a433d8bbe31ff16156f5d2864f0435e9fc440ed (diff) | |
download | firstaidkit-8d54d4fcd456b3d57c86d35a3dc2544d21c93ef4.tar.gz firstaidkit-8d54d4fcd456b3d57c86d35a3dc2544d21c93ef4.tar.xz firstaidkit-8d54d4fcd456b3d57c86d35a3dc2544d21c93ef4.zip |
Create a new argument (reverting) for the BackupPersistent constructor.
It is necessary to differentiate between calling the BackupPersistent class
for backup purposes or for reverting purposes.
Also the grub revert function and the firstaidkitrevert file changed to
address the new changes.
Diffstat (limited to 'pyfirstaidkit')
-rw-r--r-- | pyfirstaidkit/utils/backup.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pyfirstaidkit/utils/backup.py b/pyfirstaidkit/utils/backup.py index 244e223..be086fb 100644 --- a/pyfirstaidkit/utils/backup.py +++ b/pyfirstaidkit/utils/backup.py @@ -238,6 +238,16 @@ class FileBackupStore(BackupStoreInterface): return False class BackupPersistent(Backup): + def __init__(self, id, path, reverting = False): + self._id = id + self._path = path + self._metafile = "__meta.pickle" + self._data = {} # name -> (stored as, origin) + self._origin = {} # origin -> name + + if not reverting: + os.makedirs(self._path) + def cleanup(self): self.saveMeta() return False |