[PATCH] modlist.py: Compare old and new values

Bhuvaneswaran Arumugam bhuvan at collab.net
Wed Sep 13 09:34:24 CEST 2006



Currently you compare the length of old and new values. So, it does not
recognize the diff when there is no change in length but the actual
string itself is changed (ex: s/usr/var/g). Due to this bug, it returns
empty ldif so subsequent call to modify_s (in my application) fails.


Please find attached the patch.
Patch by: Bhuvaneswaran Arumugam <bhuvan at collab.net>
  * (modifyModlist): Compare the old and new value instead of their
    length. When it is compared against the length, it returns empty
    ldif even though there is difference between old and new value but
    not in length.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: modlist.py.diff
Type: text/x-patch
Size: 337 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20060913/2af4fc2d/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20060913/2af4fc2d/attachment.pgp>

More information about the python-ldap mailing list