ldap.modify_s doesn't seem to work

Steffen Ries steffen.ries at sympatico.ca
Fri Nov 3 08:33:23 EST 2000


"Jørgen Teunis" <jorgen at bos.nl> writes:

> I try to use ldap.modify_s but it doesn't work.
> Can anybody give me some example.
> 
> I get this error:
> 
> Traceback (most recent call last):
>   File "modify.cgi", line 18, in ?
>     ldap.modify_s(dn ,
> AttributeError: modify_s

You have to open a connection to the ldap server and apply the
"modify_s" method to the connection object. (You were trying to use a
modify_s function in the ldap-module, which does not exist).

e.g.:
server=ldap.open("localhost")
server.modify_s(DN, [(ldap.MOD_REPLACE, "attr", ["value1", "value2"])])

hth,
/steffen
-- 
steffen.ries at sympatico.ca	<> Gravity is a myth -- the Earth sucks!



More information about the Python-list mailing list