It is possible for the attribute "ldap3_manager_main_connection" might exist in the context, but the value to be None. In particular, this can happen during unit tests while using mock functionality. This check prevents attempting to unbind a None value.
It is possible for the attribute "ldap3_manager_main_connection" might exist in the context, but the value to be
None
. In particular, this can happen during unit tests while using mock functionality. This check prevents attempting to unbind aNone
value.