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()
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")