diff options
author | Martin Sivak <msivak@redhat.com> | 2008-09-08 12:53:52 +0200 |
---|---|---|
committer | Martin Sivak <msivak@redhat.com> | 2008-09-08 12:53:52 +0200 |
commit | 7bd6fbb6b66bab5feada209bac64d4702133271b (patch) | |
tree | deb54c15be7f9ba739f0ccc45248ad09da455d09 /pyfirstaidkit/utils/backup.py | |
parent | ee3736fe22286948e4823f3f1fc866f477f882dd (diff) | |
download | firstaidkit-7bd6fbb6b66bab5feada209bac64d4702133271b.tar.gz firstaidkit-7bd6fbb6b66bab5feada209bac64d4702133271b.tar.xz firstaidkit-7bd6fbb6b66bab5feada209bac64d4702133271b.zip |
Error during deleting the metadata file is not fatal
Diffstat (limited to 'pyfirstaidkit/utils/backup.py')
-rw-r--r-- | pyfirstaidkit/utils/backup.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pyfirstaidkit/utils/backup.py b/pyfirstaidkit/utils/backup.py index 5090c37..244e223 100644 --- a/pyfirstaidkit/utils/backup.py +++ b/pyfirstaidkit/utils/backup.py @@ -208,7 +208,10 @@ class FileBackupStore(BackupStoreInterface): _datakeys = self._data.keys() for name in _datakeys: self.delete(name) - os.remove(os.path.join(self._path, self._metafile)) + try: + os.remove(os.path.join(self._path, self._metafile)) + except OSError: + pass os.rmdir(self._path) return True |