[python-ldap] Question modifyModlist

Bas van der Vlies bas.vandervlies at surfsara.nl
Wed Jan 23 10:33:41 CET 2013


  I am using the function to replace attribute values. The generated ldif is always:
   (ldap.MOD_DELETE, "gidNumber", None),
   (ldap.MOD_ADD, "gidNumber", gid_new),

For most situations this is good, but for this situation i only want to replace the gidnumber only if it matches the old value, e.g.:
   (ldap.MOD_DELETE, "gidNumber", gid_old),
   (ldap.MOD_ADD, "gidNumber", gid_new),

I could not find an option for modifyModlist() to generate this ldif. is this possible?


Bas van der Vlies           
mail:  bas at surfsara.nl     
SURFsara, www.surfsara.nl
Amsterdam, The Netherlands

More information about the python-ldap mailing list