diff options
author | Unknown <unknown@unknown.org> | 2010-11-01 17:37:16 (GMT) |
---|---|---|
committer | Sascha Silbe <sascha-pgp@silbe.org> | 2010-11-01 17:37:16 (GMT) |
commit | 0974cd4983a5145ca949ff8254a95d36eb9cbaf0 (patch) | |
tree | 8fc528acfd41d4ca7c62a2ae4f05b0252a162922 | |
parent | 95c5d069a039b6c2a9f1da482c8bc2cc9e857510 (diff) |
sl1876.patch
-rw-r--r-- | 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..f63cf93 100644 --- a/src/sugar/bundle/bundle.py +++ b/src/sugar/bundle/bundle.py @@ -71,7 +71,12 @@ class Bundle(object): self._zip_file = None if not os.path.isdir(self._path): - self._zip_file = zipfile.ZipFile(self._path) + try: + self._zip_file = zipfile.ZipFile(self._path) + except (zipfile.error, LargeZipFile), ziperror: + raise MalformedBundleException( + "Error accessing zip file %s: %s" + % (self._path, ziperror)) self._check_zip_bundle() # manifest = self._get_file(self._infodir + '/contents') |