diff options
Diffstat (limited to 'ipalib/plugins/b_xmlrpc.py')
-rw-r--r-- | ipalib/plugins/b_xmlrpc.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ipalib/plugins/b_xmlrpc.py b/ipalib/plugins/b_xmlrpc.py index 61935f01..d7cbd856 100644 --- a/ipalib/plugins/b_xmlrpc.py +++ b/ipalib/plugins/b_xmlrpc.py @@ -24,6 +24,7 @@ Lightwieght XML-RPC client using Python standard library xmlrpclib. """ import xmlrpclib +import socket from ipalib.backend import Backend from ipalib.util import xmlrpc_marshal from ipalib import api @@ -35,7 +36,7 @@ class xmlrpc(Backend): def get_client(self): # FIXME: The server uri should come from self.api.env.server_uri - return xmlrpclib.ServerProxy('http://localhost:8080', allow_none=True) + return xmlrpclib.ServerProxy('http://localhost:8888', allow_none=True) def forward_call(self, name, *args, **kw): """ @@ -44,6 +45,10 @@ class xmlrpc(Backend): client = self.get_client() command = getattr(client, name) params = xmlrpc_marshal(*args, **kw) - return command(*params) + try: + return command(*params) + except socket.error, e: + print e[1] + return False api.register(xmlrpc) |