django 1.0 compatibility
[matthijs/upstream/django-ldapdb.git] / ldapdb / __init__.py
index 0e4024de4f8402fe372a0e63e6f8c7be55dc017a..4cde6c08931d08e9c1754b4baaeca1c231ffb8aa 100644 (file)
@@ -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: