Skip to content

Commit 56bc4af

Browse files
authored
Replace deprecated error with BadZipFile (nltk#3132)
1 parent cbe715a commit 56bc4af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nltk/downloader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2244,7 +2244,7 @@ def _unzip_iter(filename, root, verbose=True):
22442244

22452245
try:
22462246
zf = zipfile.ZipFile(filename)
2247-
except zipfile.error as e:
2247+
except zipfile.BadZipFile:
22482248
yield ErrorMessage(filename, "Error with downloaded zip file")
22492249
return
22502250
except Exception as e:

0 commit comments

Comments
 (0)