mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #15767: Excise the remaining instances of ModuleNotFoundError
This commit is contained in:
parent
3dfd23245b
commit
260fbe80c5
8 changed files with 27 additions and 27 deletions
|
@ -18,18 +18,18 @@ import binascii
|
|||
try:
|
||||
import zlib # We may need its compression method
|
||||
crc32 = zlib.crc32
|
||||
except ModuleNotFoundError:
|
||||
except ImportError:
|
||||
zlib = None
|
||||
crc32 = binascii.crc32
|
||||
|
||||
try:
|
||||
import bz2 # We may need its compression method
|
||||
except ModuleNotFoundError:
|
||||
except ImportError:
|
||||
bz2 = None
|
||||
|
||||
try:
|
||||
import lzma # We may need its compression method
|
||||
except ModuleNotFoundError:
|
||||
except ImportError:
|
||||
lzma = None
|
||||
|
||||
__all__ = ["BadZipFile", "BadZipfile", "error",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue