equal
deleted
inserted
replaced
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] |