From 6eea6664e079d187c3b0420b4283af35205d3b03 Mon Sep 17 00:00:00 2001 From: Karl MacMillan Date: Tue, 28 Aug 2007 09:58:10 -0400 Subject: 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. --- ipa-python/ipaclient.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'ipa-python/ipaclient.py') diff --git a/ipa-python/ipaclient.py b/ipa-python/ipaclient.py index 28573aca..71def70f 100644 --- a/ipa-python/ipaclient.py +++ b/ipa-python/ipaclient.py @@ -30,14 +30,6 @@ import group import ipa import config -def cidict_to_dict(cid): - """Convert a cidict to a standard dict for sending across the wire""" - newdict = {} - kindex = cid.keys() - for dkey in kindex: - newdict[dkey] = cid[dkey] - return newdict - class IPAClient: def __init__(self,local=None): @@ -89,7 +81,7 @@ class IPAClient: result = self.transport.get_all_users() all_users = [] - for (attrs) in result: + for attrs in result: if attrs is not None: all_users.append(user.User(attrs)) @@ -107,7 +99,7 @@ class IPAClient: result = self.transport.find_users(criteria, sattrs) users = [] - for (attrs) in result: + for attrs in result: if attrs is not None: users.append(user.User(attrs)) @@ -165,7 +157,7 @@ class IPAClient: result = self.transport.find_groups(criteria, sattrs) groups = [] - for (attrs) in result: + for attrs in result: if attrs is not None: groups.append(group.Group(attrs)) -- cgit