aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'pypy/module/_warnings/interp_warnings.py')
-rw-r--r--pypy/module/_warnings/interp_warnings.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pypy/module/_warnings/interp_warnings.py b/pypy/module/_warnings/interp_warnings.py
index c89f524575..4f9dc0c2a1 100644
--- a/pypy/module/_warnings/interp_warnings.py
+++ b/pypy/module/_warnings/interp_warnings.py
@@ -323,7 +323,8 @@ def do_warn_explicit(space, w_category, w_message, context_w,
if action != 'always':
if not space.is_w(w_registry, space.w_None):
space.setitem(w_registry, w_key, space.w_True)
- elif action == 'once':
+
+ if action == 'once':
if space.is_w(w_registry, space.w_None):
w_registry = get_once_registry(space)
warned = update_registry(space, w_registry, w_text, w_category)