fnp
/
django-cas-provider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7ac783b
)
Made logging of failed validation more explicit.
author
deyk
<deyk@crossway.org>
Fri, 3 Feb 2012 23:00:52 +0000
(15:00 -0800)
committer
deyk
<deyk@crossway.org>
Fri, 3 Feb 2012 23:00:52 +0000
(15:00 -0800)
cas_provider/views.py
patch
|
blob
|
history
diff --git
a/cas_provider/views.py
b/cas_provider/views.py
index
108bc38
..
eed2d64
100644
(file)
--- a/
cas_provider/views.py
+++ b/
cas_provider/views.py
@@
-135,6
+135,9
@@
def validate(request):
if service is not None and ticket_string is not None:
try:
ticket = ServiceTicket.objects.get(ticket=ticket_string)
if service is not None and ticket_string is not None:
try:
ticket = ServiceTicket.objects.get(ticket=ticket_string)
+ except ServiceTicket.DoesNotExist:
+ logger.exception("Tried to validate with an invalid ticket: %s / %s", ticket_string, service)
+ else:
username = ticket.user.username
ticket.delete()
username = ticket.user.username
ticket.delete()
@@
-143,9
+146,6
@@
def validate(request):
return HttpResponse("yes\n%s\n%s" % (username, histories))
return HttpResponse("yes\n%s\n%s" % (username, histories))
- except Exception as e:
- logger.exception("Got an exception!: %s"% e)
-
return HttpResponse("no\n\n")
return HttpResponse("no\n\n")