diff options
author | Brett Cannon <brett@python.org> | 2013-07-04 21:43:24 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2013-07-04 21:43:24 (GMT) |
commit | cd171c8e92c10d327151400fd8f16b11a4964615 (patch) | |
tree | db734100511572201a54a6b7ce1803bcea4c94da /Lib/shutil.py | |
parent | fff59155d40ede93594eb77f320e0bde658cce28 (diff) | |
download | cpython-cd171c8e92c10d327151400fd8f16b11a4964615.zip cpython-cd171c8e92c10d327151400fd8f16b11a4964615.tar.gz cpython-cd171c8e92c10d327151400fd8f16b11a4964615.tar.bz2 |
Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a)
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r-- | Lib/shutil.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py index 9d1a466..6879d8b 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -17,17 +17,17 @@ try: import bz2 del bz2 _BZ2_SUPPORTED = True -except ModuleNotFoundError: +except ImportError: _BZ2_SUPPORTED = False try: from pwd import getpwnam -except ModuleNotFoundError: +except ImportError: getpwnam = None try: from grp import getgrnam -except ModuleNotFoundError: +except ImportError: getgrnam = None __all__ = ["copyfileobj", "copyfile", "copymode", "copystat", "copy", "copy2", @@ -668,7 +668,7 @@ def _make_zipfile(base_name, base_dir, verbose=0, dry_run=0, logger=None): # command. try: import zipfile - except ModuleNotFoundError: + except ImportError: zipfile = None if zipfile is None: @@ -858,7 +858,7 @@ def _unpack_zipfile(filename, extract_dir): """ try: import zipfile - except ModuleNotFoundError: + except ImportError: raise ReadError('zlib not supported, cannot unpack this archive.') if not zipfile.is_zipfile(filename): |