summaryrefslogtreecommitdiff
path: root/src/mailman/rest/helpers.py
diff options
context:
space:
mode:
authorBarry Warsaw2010-06-18 14:04:45 -0400
committerBarry Warsaw2010-06-18 14:04:45 -0400
commitf4e7637b1682f025cc6c8bfb172eda8b710e3218 (patch)
treebbc66b16c54656e572d83dfb5ff2a40b6c638e13 /src/mailman/rest/helpers.py
parent7a147b7d1dee75f488102783550ec4f1fa36249c (diff)
downloadmailman-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.py11
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