From: Michael <mi...@st...> - 2001-05-08 12:37:53
|
Cc:-ed to python-ldap-dev list since it might be interesting for others... Michael Schwartz wrote: > = > On Tue, 8 May 2001, Michael [iso-8859-1] Str=F6der wrote: > = > > Ah, ldif.CreateLDIF() does not add the necessary empty line to > > separate entries. > > > That's great that you found the bug. There seem to be a misunderstanding. This is an intended and documented behaviour. I'm not sure why I left it out but there was some reason (probably for having the possibility to add comment lines with LDIF 1 format). See web2ldap's module w2lsearch.py on how to write LDIF. Here's the relevant excerpt. ------------------------ snip ------------------------ # async search initiated before... result_type,result_dnlist =3D ls.l.result(ldap_msgid,0) while result_dnlist: for dn,entry in result_dnlist: outf.write('%s\n' % ldif.CreateLDIF(dn,entry,w2lcore.ldap_binaryattrkeys)) result_type,result_dnlist =3D ls.l.result(ldap_msgid,0) ------------------------ snip ------------------------ Ciao, Michael. |