summaryrefslogtreecommitdiffstats
path: root/Lib/zipfile.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-06-27 22:25:03 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-06-27 22:25:03 (GMT)
commitc0fac96c29a3842d9370e4c954ae1f4d57f849d0 (patch)
tree79a674fa3d0b905a3d395ded0998cb56606ef298 /Lib/zipfile.py
parent6f3eaa67e51ed0c1b493a26afdf4417d4105d96d (diff)
downloadcpython-c0fac96c29a3842d9370e4c954ae1f4d57f849d0.zip
cpython-c0fac96c29a3842d9370e4c954ae1f4d57f849d0.tar.gz
cpython-c0fac96c29a3842d9370e4c954ae1f4d57f849d0.tar.bz2
SF patch #756996: Bare except in ZipFile.testzip()
(Contributed by Steven Taschuk) Replaces a bare except that caused all errors to be mis-reported as archive errors. Added a related NEWS item.
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r--Lib/zipfile.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index 207fc34..b1943c1 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -327,7 +327,7 @@ class ZipFile:
for zinfo in self.filelist:
try:
self.read(zinfo.filename) # Check CRC-32
- except:
+ except BadZipfile:
return zinfo.filename
def getinfo(self, name):