aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/plugins/api/tools.py
diff options
context:
space:
mode:
authorSebastian Spaeth <Sebastian@SSpaeth.de>2012-12-23 11:58:51 +0100
committerSebastian Spaeth <Sebastian@SSpaeth.de>2012-12-23 11:58:51 +0100
commitcfa922295e5ddfaab336a3c2c0403422f77758b6 (patch)
treef24dcebc6214e2804646c04ff801886b8a11c4b5 /mediagoblin/plugins/api/tools.py
parent785b287fcb42ac9130b222006097e3f68cec3543 (diff)
downloadmediagoblin-cfa922295e5ddfaab336a3c2c0403422f77758b6.tar.lz
mediagoblin-cfa922295e5ddfaab336a3c2c0403422f77758b6.tar.xz
mediagoblin-cfa922295e5ddfaab336a3c2c0403422f77758b6.zip
Convert return HttpException to raise HttpException
controllers (view function) raise HttpException's and do not return them. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Diffstat (limited to 'mediagoblin/plugins/api/tools.py')
-rw-r--r--mediagoblin/plugins/api/tools.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/plugins/api/tools.py b/mediagoblin/plugins/api/tools.py
index 0ef91127..03f528ce 100644
--- a/mediagoblin/plugins/api/tools.py
+++ b/mediagoblin/plugins/api/tools.py
@@ -142,7 +142,7 @@ def api_auth(controller):
# If we can't find any authentication methods, we should not let them
# pass.
if not auth_candidates:
- return Forbidden()
+ raise Forbidden()
# For now, just select the first one in the list
auth = auth_candidates[0]
@@ -156,7 +156,7 @@ def api_auth(controller):
'status': 403,
'errors': auth.errors})
- return Forbidden()
+ raise Forbidden()
return controller(request, *args, **kw)