From 3fd062f4f4114436213ca2759638a60e5463f605 Mon Sep 17 00:00:00 2001
From: Martin Dengler <martin@martindengler.com>
Date: Tue, 10 Aug 2010 09:32:02 +0100
Subject: [PATCH] #1876 Failure to cleanup temporary files after filesystem full errors
More gracefully handle large zip files or malformed bundle errors; not
a fix to the underlying issue.
---
src/sugar/bundle/bundle.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/sugar/bundle/bundle.py b/src/sugar/bundle/bundle.py
index cb110cc..8fb4f79 100644
a
|
b
|
class Bundle(object): |
71 | 71 | self._zip_file = None |
72 | 72 | |
73 | 73 | if not os.path.isdir(self._path): |
74 | | self._zip_file = zipfile.ZipFile(self._path) |
| 74 | try: |
| 75 | self._zip_file = zipfile.ZipFile(self._path) |
| 76 | except (zipfile.error, zipfile.LargeZipFile), ziperror: |
| 77 | raise MalformedBundleException( |
| 78 | "Error accessing zip file %s: %s" |
| 79 | % (self._path, ziperror)) |
75 | 80 | self._check_zip_bundle() |
76 | 81 | |
77 | 82 | # manifest = self._get_file(self._infodir + '/contents') |