blob: ac80ce6a830405f212b4985dd53a0f7252f13912 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
--- sugar-toolkit-0.88.1/src/sugar/bundle/bundle.py.orig 2010-06-03 02:55:42.000000000 -0400
+++ sugar-toolkit-0.88.1/src/sugar/bundle/bundle.py 2010-06-06 10:09:00.000000000 -0400
@@ -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')
|