summaryrefslogtreecommitdiffstats
path: root/pyfirstaidkit/utils/backup.py
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2008-09-08 12:53:52 +0200
committerMartin Sivak <msivak@redhat.com>2008-09-08 12:53:52 +0200
commit7bd6fbb6b66bab5feada209bac64d4702133271b (patch)
treedeb54c15be7f9ba739f0ccc45248ad09da455d09 /pyfirstaidkit/utils/backup.py
parentee3736fe22286948e4823f3f1fc866f477f882dd (diff)
downloadfirstaidkit-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.py5
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