diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2016-09-07 22:42:32 (GMT) |
---|---|---|
committer | Eric Snow <ericsnowcurrently@gmail.com> | 2016-09-07 22:42:32 (GMT) |
commit | c943265ba56e7ce7e2fe79fdecfc6670e10e5467 (patch) | |
tree | 3447a25e48844f57e2e8452aad43a3567101cd32 /Lib/_compat_pickle.py | |
parent | 86a76684269f940a20366cb42668f1acb0982dca (diff) | |
download | cpython-c943265ba56e7ce7e2fe79fdecfc6670e10e5467.zip cpython-c943265ba56e7ce7e2fe79fdecfc6670e10e5467.tar.gz cpython-c943265ba56e7ce7e2fe79fdecfc6670e10e5467.tar.bz2 |
Issue #15767: Add ModuleNotFoundError.
Diffstat (limited to 'Lib/_compat_pickle.py')
-rw-r--r-- | Lib/_compat_pickle.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/_compat_pickle.py b/Lib/_compat_pickle.py index c0e0443..f68496a 100644 --- a/Lib/_compat_pickle.py +++ b/Lib/_compat_pickle.py @@ -242,3 +242,10 @@ PYTHON3_OSERROR_EXCEPTIONS = ( for excname in PYTHON3_OSERROR_EXCEPTIONS: REVERSE_NAME_MAPPING[('builtins', excname)] = ('exceptions', 'OSError') + +PYTHON3_IMPORTERROR_EXCEPTIONS = ( + 'ModuleNotFoundError', +) + +for excname in PYTHON3_IMPORTERROR_EXCEPTIONS: + REVERSE_NAME_MAPPING[('builtins', excname)] = ('exceptions', 'ImportError') |