Got new ldap connection working using Connectible.connect()

This commit is contained in:
Jason Gerard DeRose
2009-01-28 16:12:49 -07:00
committed by Rob Crittenden
parent 231f0bd65a
commit a0aebd46a1
9 changed files with 48 additions and 38 deletions

View File

@@ -217,11 +217,10 @@ class xmlclient(Connectible):
self.__errors = dict((e.errno, e) for e in public_errors)
def create_connection(self, ccache=None):
return ServerProxy(self.env.xmlrpc_uri,
#transport=KerbTransport(),
allow_none=True,
encoding='UTF-8',
)
kw = dict(allow_none=True, encoding='UTF-8')
if self.env.xmlrpc_uri.startswith('https://'):
kw['transport'] = KerbTransport()
return ServerProxy(self.env.xmlrpc_uri, **kw)
def destroy_connection(self):
pass
@@ -241,6 +240,7 @@ class xmlclient(Connectible):
raise ValueError(
'%s.forward(): %r not in api.Command' % (self.name, name)
)
self.info('Forwarding %r to %r', name, self.env.xmlrpc_uri)
command = getattr(self.conn, name)
params = args + (kw,)
try: