[python3-ldap] Key error help
Andrew Hydle
ahydle at gmail.com
Sat Mar 22 01:54:00 CET 2014
A hah! That makes perfect sense. Thank you!
On Fri, Mar 21, 2014 at 3:54 PM, Joseph L. Casale <jcasale at activenetwerx.com
> wrote:
> > It is querying against Windows Server 2012 Active Directory. If I
> perform the search
> > on those URI's I dont believe it will return any of my users. Those are
> specific schema
> > containers for active directory. Is there a way I can get it to not come
> back in the response?
>
> (misdirected the first response...)
>
> Be more robust in your parsing, you are looking for an account object,
> this has a 'dn' or a
> 'type' of 'searchResEntry' for example...
>
> for resp in connection.response:
> if resp['type'] == 'searchResEntry':
> return resp['dn'], resp['attributes']
>
> Additionally, don't index an object you don't know exists. Check for it
> first for example...
>
> hth,
> jlc
> _______________________________________________
> python3-ldap mailing list
> python3-ldap at python.org
> https://mail.python.org/mailman/listinfo/python3-ldap
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python3-ldap/attachments/20140321/619e27b3/attachment.html>
More information about the python3-ldap
mailing list