Lines Matching refs:action

130 def filterwarnings(action, message="", category=Warning, module="", lineno=0,
134 'action' -- one of "error", "ignore", "always", "default", "module",
142 assert action in ("error", "ignore", "always", "default", "module",
143 "once"), "invalid action: %r" % (action,)
163 _add_filter(action, message, category, module, lineno, append=append)
165 def simplefilter(action, category=Warning, lineno=0, append=False):
169 'action' -- one of "error", "ignore", "always", "default", "module",
175 assert action in ("error", "ignore", "always", "default", "module",
176 "once"), "invalid action: %r" % (action,)
179 _add_filter(action, None, category, None, lineno, append=append)
219 action, message, category, module, lineno = [s.strip()
221 action = _getaction(action)
238 filterwarnings(action, message, category, module, lineno)
241 def _getaction(action):
242 if not action:
244 if action == "all": return "always" # Alias
246 if a.startswith(action):
248 raise _OptionError("invalid action: %r" % (action,))
352 action, msg, cat, mod, ln = item
359 action = defaultaction
361 if action == "ignore":
369 if action == "error":
372 if action == "once":
378 elif action == "always":
380 elif action == "module":
386 elif action == "default":
391 "Unrecognized action (%r) in warnings.filters:\n %s" %
392 (action, item))
435 If the 'action' argument is not None, the remaining arguments are passed
441 action=None, category=Warning, lineno=0, append=False):
452 if action is None:
455 self._filter = (action, category, lineno, append)
542 # - an action: error, ignore, always, default, module, or once