diff options
| author | Barry Warsaw | 2010-06-18 14:04:45 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2010-06-18 14:04:45 -0400 |
| commit | f4e7637b1682f025cc6c8bfb172eda8b710e3218 (patch) | |
| tree | bbc66b16c54656e572d83dfb5ff2a40b6c638e13 /src/mailman/rest/helpers.py | |
| parent | 7a147b7d1dee75f488102783550ec4f1fa36249c (diff) | |
| download | mailman-f4e7637b1682f025cc6c8bfb172eda8b710e3218.tar.gz mailman-f4e7637b1682f025cc6c8bfb172eda8b710e3218.tar.zst mailman-f4e7637b1682f025cc6c8bfb172eda8b710e3218.zip | |
Diffstat (limited to 'src/mailman/rest/helpers.py')
| -rw-r--r-- | src/mailman/rest/helpers.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mailman/rest/helpers.py b/src/mailman/rest/helpers.py index 369eebffa..8a82ebb60 100644 --- a/src/mailman/rest/helpers.py +++ b/src/mailman/rest/helpers.py @@ -24,6 +24,7 @@ __all__ = [ 'ContainerMixin', 'etag', 'path_to', + 'restish_matcher', ] @@ -162,3 +163,13 @@ class Validator: missing = COMMASPACE.join(sorted(required_keys - value_keys)) raise ValueError('Missing parameters: {0}'.format(missing)) return values + + + +# XXX 2010-02-24 barry Seems like contrary to the documentation, matchers +# cannot be plain functions, because matchers must have a .score attribute. +# OTOH, I think they support regexps, so that might be a better way to go. +def restish_matcher(function): + """Decorator for restish matchers.""" + function.score = () + return function |
