diff options
author | Karl MacMillan <kmacmillan@mentalrootkit.com> | 2007-08-28 09:58:10 -0400 |
---|---|---|
committer | Karl MacMillan <kmacmillan@mentalrootkit.com> | 2007-08-28 09:58:10 -0400 |
commit | 6eea6664e079d187c3b0420b4283af35205d3b03 (patch) | |
tree | c579e484bd63dfc8d9d5db1369b36554ddb06531 /ipa-server/ipaserver/ipaldap.py | |
parent | e31b526c8174e7c55f69b1fdf31a6ee78197e8bc (diff) | |
download | freeipa.git-6eea6664e079d187c3b0420b4283af35205d3b03.tar.gz freeipa.git-6eea6664e079d187c3b0420b4283af35205d3b03.tar.xz freeipa.git-6eea6664e079d187c3b0420b4283af35205d3b03.zip |
This patch wraps binary data in an xmlrpclib Binary object. This
removes the need for LDIF conversion. It will make TurboGears direct
code faster, but should keep xmlrpc about the same speed.
The patch also swaps out ldap.cidict for the IPA CIDict class. IPA code
should only use the CIDict class now.
Diffstat (limited to 'ipa-server/ipaserver/ipaldap.py')
-rw-r--r-- | ipa-server/ipaserver/ipaldap.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ipa-server/ipaserver/ipaldap.py b/ipa-server/ipaserver/ipaldap.py index 0b2a152e..344e6dc3 100644 --- a/ipa-server/ipaserver/ipaldap.py +++ b/ipa-server/ipaserver/ipaldap.py @@ -39,7 +39,7 @@ from ldap.modlist import modifyModlist from ldap.ldapobject import SimpleLDAPObject -from ipa import ipaerror +from ipa import ipaerror, ipautil class Entry: """This class represents an LDAP Entry object. An LDAP entry consists of a DN @@ -47,7 +47,7 @@ class Entry: values. In python-ldap, entries are returned as a list of 2-tuples. Instance variables: dn - string - the string DN of the entry - data - cidict - case insensitive dict of the attributes and values""" + data - CIDict - case insensitive dict of the attributes and values""" def __init__(self,entrydata): """data is the raw data returned from the python-ldap result method, which is @@ -56,13 +56,13 @@ class Entry: if entrydata: if isinstance(entrydata,tuple): self.dn = entrydata[0] - self.data = ldap.cidict.cidict(entrydata[1]) + self.data = ipautil.CIDict(entrydata[1]) elif isinstance(entrydata,str) or isinstance(entrydata,unicode): self.dn = entrydata - self.data = ldap.cidict.cidict() + self.data = ipautil.CIDict() else: self.dn = '' - self.data = ldap.cidict.cidict() + self.data = ipautil.CIDict() def __nonzero__(self): """This allows us to do tests like if entry: returns false if there is no data, |