summaryrefslogtreecommitdiff
path: root/horizon/exceptions.py
diff options
context:
space:
mode:
authorGabriel Hurley <gabriel@strikeawe.com>2012-08-09 19:00:49 -0700
committerGabriel Hurley <gabriel@strikeawe.com>2012-08-09 19:02:03 -0700
commitc96677576a21c8dc89b327c92c86d7964f12fe4a (patch)
tree623a8eac5493b755e7d75fc7276a4ef49d2b8979 /horizon/exceptions.py
parent87ef0db150d241ea98d3b582c55139a253bb6152 (diff)
downloadhorizon-c96677576a21c8dc89b327c92c86d7964f12fe4a.tar.gz
Don't call a method that doesn't exist for unauth'd requests.
Fixes a broken method call in a previously untested code path. Change-Id: I72343ba51f9871b4e85641d773b574fb218fb158
Diffstat (limited to 'horizon/exceptions.py')
-rw-r--r--horizon/exceptions.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/horizon/exceptions.py b/horizon/exceptions.py
index f31455bb2..18303e9f9 100644
--- a/horizon/exceptions.py
+++ b/horizon/exceptions.py
@@ -23,6 +23,7 @@ import os
import sys
from django.conf import settings
+from django.contrib.auth import logout
from django.http import HttpRequest
from django.utils import termcolors
from django.utils.translation import ugettext as _
@@ -260,7 +261,7 @@ def handle(request, message=None, redirect=None, ignore=False,
if issubclass(exc_type, UNAUTHORIZED):
if ignore:
return NotAuthorized
- request.user_logout()
+ logout(request)
if not force_silence and not handled:
log_method(error_color("Unauthorized: %s" % exc_value))
if not handled: