From 5774dc7f68ab25ff702ce0c2e2b3d9a13566d14a Mon Sep 17 00:00:00 2001 From: Patrick Date: Tue, 29 Sep 2020 21:49:43 +0000 Subject: [PATCH] add exception --- fet2020/authentications/authentications.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fet2020/authentications/authentications.py b/fet2020/authentications/authentications.py index 4d01d570..8d469d6a 100644 --- a/fet2020/authentications/authentications.py +++ b/fet2020/authentications/authentications.py @@ -28,6 +28,9 @@ def authentication(username, password): except LDAPBindError as e: logger.info('Username does not exist. Error: {}'.format(e)) username = None + except Exception as e: + logger.info('Connection to server lost. Error: {}'.format(e)) + username = None if not has_user: username = None