diff options
author | Sascha 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) |
commit | 3df8a5b8a4242179b158cf925daa28b68ae1e705 (patch) | |
tree | b4a28ab21961eeb5b5fd4ceb4e0e5980ddb16630 | |
parent | 959ddd059f8753126290a5fbb78f9539d4fceb07 (diff) |
fix breakage on disk-full
-rw-r--r-- | backup.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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. |