X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=ldapdb%2F__init__.py;h=4cde6c08931d08e9c1754b4baaeca1c231ffb8aa;hb=5b07fe4646e8171565701bef9884d257f18cf65c;hp=0e4024de4f8402fe372a0e63e6f8c7be55dc017a;hpb=d611dd2db3169d556496f87066bcbf37ae9d88d4;p=matthijs%2Fupstream%2Fdjango-ldapdb.git diff --git a/ldapdb/__init__.py b/ldapdb/__init__.py index 0e4024d..4cde6c0 100644 --- a/ldapdb/__init__.py +++ b/ldapdb/__init__.py @@ -32,7 +32,7 @@ def convert(field, value, func): else: return func(value) -class LdapConnection(): +class LdapConnection(object): def __init__(self, server, bind_dn, bind_password): self.connection = ldap.initialize(server) self.connection.simple_bind_s(bind_dn, bind_password) @@ -56,6 +56,9 @@ class LdapConnection(): mods.append((op, field, convert(field, value, lambda x: x.encode('utf-8')))) return self.connection.modify_s(dn, mods) + def rename_s(self, dn, newrdn): + return self.connection.rename_s(dn, newrdn) + def search_s(self, base, scope, filterstr, attrlist): results = self.connection.search_s(base, scope, filterstr, attrlist) for dn, attrs in results: