From a92081108f2f9f0f70bd804bd3e87ab16bd02ea7 Mon Sep 17 00:00:00 2001 From: deyk Date: Wed, 18 Jan 2012 13:52:09 -0800 Subject: [PATCH] Added more specific exception handling. This clears up the LoginTicket issue we were having upon successful login. --- cas_provider/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cas_provider/forms.py b/cas_provider/forms.py index f40d18c..88d2926 100644 --- a/cas_provider/forms.py +++ b/cas_provider/forms.py @@ -33,7 +33,7 @@ class LoginForm(forms.Form): lt = self.fields['lt'].initial() try: login_ticket = LoginTicket.objects.get(ticket=lt) - except: + except LoginTicket.DoesNotExist: raise forms.ValidationError("Login ticket expired. Please try again.") else: login_ticket.delete() -- 2.20.1