summaryrefslogtreecommitdiffstats
path: root/Lib/zipfile.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2013-06-13 00:12:30 (GMT)
committerBrett Cannon <brett@python.org>2013-06-13 00:12:30 (GMT)
commitc9a1bfed5d820b681debca52554fea76ba0a9ae0 (patch)
treeba3c9fd41acbffaa32bf6e09a323471778064be7 /Lib/zipfile.py
parent603dcf27140ca109d11496eb4a57fe6440ddc915 (diff)
downloadcpython-c9a1bfed5d820b681debca52554fea76ba0a9ae0.zip
cpython-c9a1bfed5d820b681debca52554fea76ba0a9ae0.tar.gz
cpython-c9a1bfed5d820b681debca52554fea76ba0a9ae0.tar.bz2
Move test___all__ over to unittest.main() and use ModuleNotFoundError
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r--Lib/zipfile.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index b90af55..adaffe1 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -18,18 +18,18 @@ import binascii
try:
import zlib # We may need its compression method
crc32 = zlib.crc32
-except ImportError:
+except ModuleNotFoundError:
zlib = None
crc32 = binascii.crc32
try:
import bz2 # We may need its compression method
-except ImportError:
+except ModuleNotFoundError:
bz2 = None
try:
import lzma # We may need its compression method
-except ImportError:
+except ModuleNotFoundError:
lzma = None
__all__ = ["BadZipFile", "BadZipfile", "error",