diff options
| author | Abhilash Raj | 2015-04-20 15:16:15 +0530 |
|---|---|---|
| committer | Abhilash Raj | 2015-04-20 15:16:15 +0530 |
| commit | 58ea970fa0f9064ae052d2b9ae1371ef00bd23e6 (patch) | |
| tree | 4d21000f8ad772377a655ff332288b1c753f5be1 /src/mailman/rest/helpers.py | |
| parent | ec053e7682b14181147d0b7bedb1e5b19a46b56b (diff) | |
| parent | 3eb81bf5078868b0fc44f991b0b4536a2a3f4b47 (diff) | |
| download | mailman-58ea970fa0f9064ae052d2b9ae1371ef00bd23e6.tar.gz mailman-58ea970fa0f9064ae052d2b9ae1371ef00bd23e6.tar.zst mailman-58ea970fa0f9064ae052d2b9ae1371ef00bd23e6.zip | |
Diffstat (limited to 'src/mailman/rest/helpers.py')
| -rw-r--r-- | src/mailman/rest/helpers.py | 6 |
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: |
