[python-ldap] feature request: be more lenient in LDIFParser

Jephte Clain jephte.clain at univ-reunion.fr
Sat Feb 6 04:40:55 EST 2016


hello,

FYI, I made feature request #18 on
http://sourceforge.net/p/python-ldap/feature-requests/18/ to make
LDIFParser more lenient

here is the description of the feature and the patch is attached:
----------------8<----------------
from the "be lenient with what you parse, be strict in what you write"
departement, I attach a patch which support ldif input with several
blank and/or comment lines between objects
I don't know if this behavior is correct wrt the LDIF standard, but it
is useful for me, because I have LDIF files with comments written by
humans, e.g:

# silly example
dn: uid=one,dc=tld
uid: one

# another silly example
dn: uid=two,dc=tld
uid: two

with the current parser, uid=two is not read because there are two
"blanks" lines before
----------------8<----------------

BTW, is there any plan to migrate python-ldap development to github or
any other similar service based on git?
It has been a long time since I last used CVS. These are all good memories :-)

very best regards,

-- 
Jephté CLAIN | Développeur, Intégrateur d'applications
Service Système d'Information
Direction des Systèmes d'Information
Tél: +262 262 93 86 31 || Gsm: +262 692 29 58 24
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ldif.py.patch
Type: text/x-patch
Size: 1448 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20160206/ce4c2011/attachment.bin>


More information about the python-ldap mailing list