summaryrefslogtreecommitdiff
path: root/src/mailman/rest/helpers.py
diff options
context:
space:
mode:
authorBarry Warsaw2010-07-06 22:58:27 -0400
committerBarry Warsaw2010-07-06 22:58:27 -0400
commit5896e00cc2fe7c04254e6f3005648039d42408e8 (patch)
tree0487d4f7c15400069a96c95d762f7aa4cf91d8e4 /src/mailman/rest/helpers.py
parentdb19156330bf6bbca9a6e13c5d85676e43be3b29 (diff)
parent8f8ce7616cc8e6149b27fbcb8e581fc35c814c87 (diff)
downloadmailman-5896e00cc2fe7c04254e6f3005648039d42408e8.tar.gz
mailman-5896e00cc2fe7c04254e6f3005648039d42408e8.tar.zst
mailman-5896e00cc2fe7c04254e6f3005648039d42408e8.zip
Diffstat (limited to 'src/mailman/rest/helpers.py')
-rw-r--r--src/mailman/rest/helpers.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mailman/rest/helpers.py b/src/mailman/rest/helpers.py
index 8a82ebb60..be5d2b565 100644
--- a/src/mailman/rest/helpers.py
+++ b/src/mailman/rest/helpers.py
@@ -23,6 +23,7 @@ __metaclass__ = type
__all__ = [
'ContainerMixin',
'etag',
+ 'no_content',
'path_to',
'restish_matcher',
]
@@ -32,8 +33,11 @@ import json
import hashlib
from lazr.config import as_boolean
+from restish.http import Response
+
from mailman.config import config
+
COMMASPACE = ', '
@@ -173,3 +177,9 @@ def restish_matcher(function):
"""Decorator for restish matchers."""
function.score = ()
return function
+
+
+# restish doesn't support HTTP response code 204.
+def no_content():
+ """204 No Content."""
+ return Response('204 No Content', [], None)