Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Silbe <sascha-pgp@silbe.org>2010-08-30 22:05:53 (GMT)
committer Sascha Silbe <sascha-pgp@silbe.org>2010-08-30 22:23:44 (GMT)
commit3df8a5b8a4242179b158cf925daa28b68ae1e705 (patch)
treeb4a28ab21961eeb5b5fd4ceb4e0e5980ddb16630
parent959ddd059f8753126290a5fbb78f9539d4fceb07 (diff)
fix breakage on disk-full
-rw-r--r--backup.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/backup.py b/backup.py
index 9f92e3f..541318a 100644
--- a/backup.py
+++ b/backup.py
@@ -315,7 +315,10 @@ class AsyncBackup(gobject.GObject):
os.remove(self._path)
if self._bundle and self._bundle.fp and not self._bundle.fp.closed:
- self._bundle.close()
+ # Close the underlying file directly instead of the zip as ZipFile
+ # will try to write the footer and potentially fail (e.g. ENOSPC).
+ self._bundle.fp.close()
+ self._bundle.fp = None
def _create_file(self, directory, prefix, suffix):
"""Create a unique file with given prefix and suffix in directory.