server/ldaputils.py
changeset 8244 c7d89541e3c5
parent 8188 1867e252e487
child 8250 171a9d6bff8f
equal deleted inserted replaced
8240:506ab2e8aeca 8244:c7d89541e3c5
   301         # this is always self._conn
   301         # this is always self._conn
   302         cnx = self.get_connection().cnx #session.cnxset.connection(self.uri).cnx
   302         cnx = self.get_connection().cnx #session.cnxset.connection(self.uri).cnx
   303         if cnx is None:
   303         if cnx is None:
   304             # cant connect to server
   304             # cant connect to server
   305             msg = session._("can't connect to source %s, some data may be missing")
   305             msg = session._("can't connect to source %s, some data may be missing")
   306             session.set_shared_data('sources_error', msg % self.uri)
   306             session.set_shared_data('sources_error', msg % self.uri, txdata=True)
   307             return []
   307             return []
   308         try:
   308         try:
   309             res = cnx.search_s(base, scope, searchstr, attrs)
   309             res = cnx.search_s(base, scope, searchstr, attrs)
   310         except ldap.PARTIAL_RESULTS:
   310         except ldap.PARTIAL_RESULTS:
   311             res = cnx.result(all=0)[1]
   311             res = cnx.result(all=0)[1]