ldap package question

John Gordon gordon at panix.com
Tue Mar 17 17:11:13 EDT 2009


I'm using the ldap package to connect to an ldap server and run a query.
Very simple code, along these lines:

  con = ldap.initialize(uri)
  con.simple_bind_s(user, password)
  results = con.search_s(group, ldap.SCOPE_SUBTREE, filter, attrs)
  for r in results:
    # inspect the results

I'm experiencing some intermittent failures and I think it's because the
URI I'm connecting to is actually an alias (proxy?  load-balancer?  I'm not
sure of the right word here) for a pool of servers, one of which is flaky.

Is there a way to ask the connection object exactly which server I'm
connected to?

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon at panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"




More information about the Python-list mailing list