(action)
| 240 | |
| 241 | # Helper for _setoption() |
| 242 | def _getaction(action): |
| 243 | if not action: |
| 244 | return "default" |
| 245 | if action == "all": return "always" # Alias |
| 246 | for a in ('default', 'always', 'ignore', 'module', 'once', 'error'): |
| 247 | if a.startswith(action): |
| 248 | return a |
| 249 | raise _OptionError("invalid action: %r" % (action,)) |
| 250 | |
| 251 | # Helper for _setoption() |
| 252 | def _getcategory(category): |
no test coverage detected