summaryrefslogtreecommitdiff
path: root/Lib/enum.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/enum.py')
-rw-r--r--Lib/enum.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/enum.py b/Lib/enum.py
index f7452f0cc0..a958ed8748 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)