[python-ldap] ANN: python-ldap 2.4.26
Michael Ströder
michael at stroeder.com
Wed Jul 27 05:03:40 EDT 2016
Benjamin Dauvergne wrote:
> I have a problem with the new LDIF parser, the following LDIF fixture (it's part
> of tests of an LDAP connector) used to be parsed correctly:
>
> '''dn: uid=john.doe,o=orga
> objectClass: inetOrgPerson
> cn: John Doe
> sn: Doe
> mail: john.doe at example.com
> uid: john.doe
> uid: john.doe at entrouvert.com
> '''
>
> now I need to feed this, i.e. I need two new lines at the end of the file:
>
> '''dn: uid=john.doe,o=orga
> objectClass: inetOrgPerson
> cn: John Doe
> sn: Doe
> mail: john.doe at example.com
> uid: john.doe
> uid: john.doe at entrouvert.com
>
> '''
Which exact error do you get?
> Was my fixture already not conformant or is the modified parser in 2.4.26 broken
Hmm, not sure about that. If I produce LDIF I always add the trailing empty line
to please all the LDIF parsers out there. But I couldn't find language in RFC
2849 which makes that mandatory.
I'm currently looking into this and I'm not sure about the use of
textwrap.dedent(ldif_string).lstrip() + '\n'
in TestLDIFParser.check_records(). For sake of readability it seems to be too
magic missing some of those corner-cases.
Ciao, Michael.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4245 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20160727/8ecceec5/attachment.bin>
More information about the python-ldap
mailing list