Skip to content

Commit 191b9cd

Browse files
committed
Restore a catch all except clause to preserve previous file processing logic.
1 parent 2cfd48b commit 191b9cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

shapefile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -966,9 +966,6 @@ def __init__(self, *args, **kwargs):
966966
for ext in ["SHP", "SHX", "DBF", "shp", "shx", "dbf"]:
967967
try:
968968
member = archive.open(shapefile + "." + ext)
969-
except zipfile.BadZipFile:
970-
pass
971-
else:
972969
# write zipfile member data to a read+write tempfile and use as source, gets deleted on close()
973970
fileobj = tempfile.NamedTemporaryFile(
974971
mode="w+b", delete=True
@@ -977,6 +974,9 @@ def __init__(self, *args, **kwargs):
977974
fileobj.seek(0)
978975
setattr(self, ext.lower(), fileobj)
979976
self._files_to_close.append(fileobj)
977+
978+
except BaseException:
979+
pass
980980
# Close and delete the temporary zipfile
981981
try:
982982
zipfileobj.close()

0 commit comments

Comments
 (0)