diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-31 13:49:26 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-31 13:49:26 (GMT) |
commit | b9100e5d9db64c727f2de579f143853eee4b0ba4 (patch) | |
tree | 9d6b74b8c6a026a3ee107512fb3caa7f933f4cc4 /Lib/_compat_pickle.py | |
parent | bfe1824d08fb107768ce17dd4de6c7f879935098 (diff) | |
download | cpython-b9100e5d9db64c727f2de579f143853eee4b0ba4.zip cpython-b9100e5d9db64c727f2de579f143853eee4b0ba4.tar.gz cpython-b9100e5d9db64c727f2de579f143853eee4b0ba4.tar.bz2 |
Issue #18473: Fixed pickle compatibility tests for optional modules.
Added WindowsError to compatibility mappings.
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 b1f15a7..6e39d4a 100644 --- a/Lib/_compat_pickle.py +++ b/Lib/_compat_pickle.py @@ -141,6 +141,13 @@ PYTHON2_EXCEPTIONS = ( "ZeroDivisionError", ) +try: + WindowsError +except NameError: + pass +else: + PYTHON2_EXCEPTIONS += ("WindowsError",) + for excname in PYTHON2_EXCEPTIONS: NAME_MAPPING[("exceptions", excname)] = ("builtins", excname) |