Added more specific exception handling. This clears up the LoginTicket issue we were...
authordeyk <deyk@crossway.org>
Wed, 18 Jan 2012 21:52:09 +0000 (13:52 -0800)
committerdeyk <deyk@crossway.org>
Wed, 18 Jan 2012 21:52:09 +0000 (13:52 -0800)
cas_provider/forms.py

index f40d18c..88d2926 100644 (file)
@@ -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()