mirror of https://github.com/zulip/zulip.git
LDAP: Remove now-impossible except clause.
Since we made ZulipLDAPException a subclass of
_LDAPUser.AuthenticationFailed, the django-auth-ldap library already
handles catching it and returning None.
This fixes missing test coverage in this function introduced by
73e8bba379
.
This commit is contained in:
parent
315f5b393b
commit
8d7f961a67
|
@ -434,8 +434,10 @@ class ZulipLDAPAuthBackend(ZulipLDAPAuthBackendBase):
|
|||
return user_profile
|
||||
except Realm.DoesNotExist:
|
||||
return None
|
||||
except ZulipLDAPException:
|
||||
return None
|
||||
# ZulipLDAPException subclasses _LDAPUser.AuthenticationFailed
|
||||
# and thus will automatically be caught and return None via
|
||||
# django-auth-ldap's existing code, so we don't need to catch
|
||||
# them here.
|
||||
|
||||
def get_or_create_user(self, username, ldap_user):
|
||||
# type: (str, _LDAPUser) -> Tuple[UserProfile, bool]
|
||||
|
|
Loading…
Reference in New Issue