diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-31 16:49:26 +0300 |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-31 16:49:26 +0300 |
| commit | b9100e5d9db64c727f2de579f143853eee4b0ba4 (patch) | |
| tree | 9d6b74b8c6a026a3ee107512fb3caa7f933f4cc4 /Lib/_compat_pickle.py | |
| parent | bfe1824d08fb107768ce17dd4de6c7f879935098 (diff) | |
| download | cpython-git-b9100e5d9db64c727f2de579f143853eee4b0ba4.tar.gz | |
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 b1f15a77ca..6e39d4aee3 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) |
