Home | History | Annotate | Download | only in python2.7

Lines Matching refs:action

45 def filterwarnings(action, message="", category=Warning, module="", lineno=0,
49 'action' -- one of "error", "ignore", "always", "default", "module",
58 assert action in ("error", "ignore", "always", "default", "module",
59 "once"), "invalid action: %r" % (action,)
67 item = (action, re.compile(message, re.I), category,
74 def simplefilter(action, category=Warning, lineno=0, append=0):
78 'action' -- one of "error", "ignore", "always", "default", "module",
84 assert action in ("error", "ignore", "always", "default", "module",
85 "once"), "invalid action: %r" % (action,)
88 item = (action, None, category, None, lineno)
118 action, message, category, module, lineno = [s.strip()
120 action = _getaction(action)
135 filterwarnings(action, message, category, module, lineno)
138 def _getaction(action):
139 if not action:
141 if action == "all": return "always" # Alias
143 if a.startswith(action):
145 raise _OptionError("invalid action: %r" % (action,))
236 action, msg, cat, mod, ln = item
243 action = defaultaction
245 if action == "ignore":
253 if action == "error":
256 if action == "once":
262 elif action == "always":
264 elif action == "module":
270 elif action == "default":
275 "Unrecognized action (%r) in warnings.filters:\n %s" %
276 (action, item))
364 # - an action: error, ignore, always, default, module, or once