From 15e3561b33f1c92b6b694d8dbd98cdd29b385fc9 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Wed, 7 Nov 2012 23:14:21 +0200 Subject: [PATCH 2/3] Fix small bug in api_varnish_purge error path HttpServerError is a function that returns HttpResponse, not an exception. --- pgweb/core/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgweb/core/views.py b/pgweb/core/views.py index 9684846..854bf93 100644 --- a/pgweb/core/views.py +++ b/pgweb/core/views.py @@ -213,7 +213,7 @@ def api_varnish_purge(request): if not request.META['REMOTE_ADDR'] in settings.VARNISH_PURGERS: return HttpServerError("Invalid client address") if request.method != 'POST': - raise HttpServerError("Can't use this way") + return HttpServerError("Can't use this way") n = int(request.POST['n']) curs = connection.cursor() for i in range(0, n): -- 1.8.0