From 6045b31350dcf8dee873d3498efe596e74b7a2f6 Mon Sep 17 00:00:00 2001 From: Hidden Z Date: Wed, 15 Oct 2014 19:04:57 +0000 Subject: [PATCH] Fix bug in subdomain verification When there is verification error and "reason" is present, no reply was returned to client causing django exception: ValueError: The view pyi2phosts.postkey.views.subdomain didn't return an HttpResponse object. --- pyi2phosts/postkey/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyi2phosts/postkey/views.py b/pyi2phosts/postkey/views.py index d920038..d303622 100644 --- a/pyi2phosts/postkey/views.py +++ b/pyi2phosts/postkey/views.py @@ -133,10 +133,10 @@ def subdomain(request): elif hasattr(e, 'code'): log.warning('%s can\'t finish the request, error code: %s', request.session['topdomain'], e.code) - return render_to_response('subdomain_http_verify_failure.html', { - 'title': settings.SITE_NAME, - 'code': e.code, - }, context_instance=RequestContext(request)) + return render_to_response('subdomain_http_verify_failure.html', { + 'title': settings.SITE_NAME, + 'code': e.code, + }, context_instance=RequestContext(request)) else: log.debug('subdomain verification success, saving host') s = save_host(request)