diff options
author | RĂ©mi Lapeyre <remi.lapeyre@henki.fr> | 2019-01-24 19:43:13 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-01-24 19:43:13 (GMT) |
commit | 1fd06f1eca80dcbf3a916133919482a8327f3da4 (patch) | |
tree | 01c702f00536f7dbec9c1a5ad2e71af482c145fe /Lib/enum.py | |
parent | 5c8f537669d3379fc50bb0a96accac756e43e281 (diff) | |
download | cpython-1fd06f1eca80dcbf3a916133919482a8327f3da4.zip cpython-1fd06f1eca80dcbf3a916133919482a8327f3da4.tar.gz cpython-1fd06f1eca80dcbf3a916133919482a8327f3da4.tar.bz2 |
bpo-35717: Fix KeyError exception raised when using enums and compile (GH-11523)
https://bugs.python.org/issue17467
Diffstat (limited to 'Lib/enum.py')
-rw-r--r-- | Lib/enum.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/enum.py b/Lib/enum.py index f7452f0..a958ed8 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -419,7 +419,7 @@ class EnumMeta(type): if module is None: try: module = sys._getframe(2).f_globals['__name__'] - except (AttributeError, ValueError) as exc: + except (AttributeError, ValueError, KeyError) as exc: pass if module is None: _make_class_unpicklable(enum_class) |