equal
deleted
inserted
replaced
225 def object_exists_in_ldap(self, dn): |
225 def object_exists_in_ldap(self, dn): |
226 cnx = self.get_connection().cnx #session.cnxset.connection(self.uri).cnx |
226 cnx = self.get_connection().cnx #session.cnxset.connection(self.uri).cnx |
227 if cnx is None: |
227 if cnx is None: |
228 return True # ldap unreachable, suppose it exists |
228 return True # ldap unreachable, suppose it exists |
229 try: |
229 try: |
230 cnx.search_s(base, scope, searchstr, attrs) |
230 cnx.search_s(dn, self.user_base_scope) |
231 except ldap.PARTIAL_RESULTS: |
231 except ldap.PARTIAL_RESULTS: |
232 pass |
232 pass |
233 except ldap.NO_SUCH_OBJECT: |
233 except ldap.NO_SUCH_OBJECT: |
234 return False |
234 return False |
235 return True |
235 return True |