mirror of
https://github.com/etesync/server
synced 2024-12-26 17:28:08 +00:00
fix: Python files
This commit is contained in:
parent
55d3fb7e8e
commit
4293acb3a3
@ -136,7 +136,7 @@ async def redis_connector(websocket: WebSocket, ticket_model: TicketInner, user:
|
||||
for task in pending:
|
||||
task.cancel()
|
||||
if receive in done:
|
||||
# Web socket should never receieve any data
|
||||
# Web socket should never receive any data
|
||||
await websocket.close(code=status.WS_1008_POLICY_VIOLATION)
|
||||
return
|
||||
|
||||
|
@ -54,7 +54,7 @@ class LDAPConnection:
|
||||
try:
|
||||
self.__ldap_connection.simple_bind_s(ldap_setting("BIND_DN", ""), password)
|
||||
except ldap.LDAPError as err:
|
||||
logging.error(f"LDAP Error occuring during bind: {err.desc}")
|
||||
logging.error(f"LDAP Error occurring during bind: {err.desc}")
|
||||
|
||||
def __is_cache_valid(self, username):
|
||||
"""Returns True if the cache entry is still valid. Returns False otherwise."""
|
||||
@ -85,7 +85,7 @@ class LDAPConnection:
|
||||
# we may expect ldap.NO_RESULTS_RETURNED, but not any other error
|
||||
return False
|
||||
except ldap.LDAPError as err:
|
||||
logging.error(f"Error occured while performing an LDAP query: {err.desc}")
|
||||
logging.error(f"Error occurred while performing an LDAP query: {err.desc}")
|
||||
return False
|
||||
|
||||
if len(result) == 1:
|
||||
|
Loading…
Reference in New Issue
Block a user