From 54e431430501633435812eb773d3e33846a60e2d Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Wed, 27 May 2015 22:28:41 +0200 Subject: [PATCH] Ignore non used parallele requestor for SSO --- cas_server/models.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/cas_server/models.py b/cas_server/models.py index e1c7ec3..a0fc018 100644 --- a/cas_server/models.py +++ b/cas_server/models.py @@ -79,14 +79,15 @@ class User(models.Model): async_list.append(ticket.logout(request, session)) ticket.delete() for future in async_list: - try: - future.result() - except Exception as error: - messages.add_message( - request, - messages.WARNING, - _(u'Error during service logout %r') % error - ) + if future: + try: + future.result() + except Exception as error: + messages.add_message( + request, + messages.WARNING, + _(u'Error during service logout %r') % error + ) def get_ticket(self, ticket_class, service, service_pattern, renew): """