summaryrefslogtreecommitdiff
path: root/src/mailman/rest/helpers.py
diff options
context:
space:
mode:
authorBarry Warsaw2015-04-15 22:51:39 -0400
committerBarry Warsaw2015-04-15 22:51:39 -0400
commit08f457799cd36349a4fd22642f4c05b4eabb306d (patch)
treec4d2270bce3862e71a252d941e3942860a8c8565 /src/mailman/rest/helpers.py
parent6c094ce9d81cd5e12ba13c851cbd1018ca3fb935 (diff)
downloadmailman-08f457799cd36349a4fd22642f4c05b4eabb306d.tar.gz
mailman-08f457799cd36349a4fd22642f4c05b4eabb306d.tar.zst
mailman-08f457799cd36349a4fd22642f4c05b4eabb306d.zip
Diffstat (limited to 'src/mailman/rest/helpers.py')
-rw-r--r--src/mailman/rest/helpers.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mailman/rest/helpers.py b/src/mailman/rest/helpers.py
index edd57b76b..c737fcbc7 100644
--- a/src/mailman/rest/helpers.py
+++ b/src/mailman/rest/helpers.py
@@ -300,6 +300,12 @@ def not_found(response, body=b'404 Not Found'):
response.body = body
+def accepted(response, body=None):
+ response.status = falcon.HTTP_202
+ if body is not None:
+ response.body = body
+
+
def bad_request(response, body='400 Bad Request'):
response.status = falcon.HTTP_400
if body is not None: