16 |
# write to the Free Software Foundation, Inc., 59 Temple Place |
# write to the Free Software Foundation, Inc., 59 Temple Place |
17 |
# - Suite 330, Boston, MA 02111-1307, USA. |
# - Suite 330, Boston, MA 02111-1307, USA. |
18 |
# |
# |
19 |
# Copyright 2001 Free Software Foundation |
# Copyright 2001-2003 Free Software Foundation |
20 |
# |
# |
21 |
# FILE: |
# FILE: |
22 |
# xmlrpc/ClientAdapter.py |
# xmlrpc/ClientAdapter.py |
72 |
from xmlrpclib import xmlrpclib |
from xmlrpclib import xmlrpclib |
73 |
|
|
74 |
except ImportError: |
except ImportError: |
75 |
raise GComm.AdapterInitializationError, \ |
tmsg = _("\nUnable to load xmlrpclib. To use the XML-RPC interface, \n") \ |
|
_("\nUnable to load xmlrpclib. To use the XML-RPC interface, \n") \ |
|
76 |
+ _("please install xmlrpc from:\n") \ |
+ _("please install xmlrpc from:\n") \ |
77 |
+ " http://www.pythonware.com/products/xmlrpc/" |
+ " http://www.pythonware.com/products/xmlrpc/" |
78 |
|
raise GComm.AdapterInitializationError, tmsg |
79 |
|
|
80 |
|
|
81 |
############################################################################## |
############################################################################## |
111 |
|
|
112 |
|
|
113 |
except KeyError: |
except KeyError: |
114 |
raise GComm.AdapterConfigurationError, \ |
tmsg = _("To use XML-RPC, you must either specify a 'url' or\n") +\ |
|
_("To use XML-RPC, you must either specify a 'url' or\n") +\ |
|
115 |
_("a 'host' and 'port' setting.") |
_("a 'host' and 'port' setting.") |
116 |
|
raise GComm.AdapterConfigurationError, tmsg |
117 |
except: |
except: |
118 |
raise GComm.AdapterInitializationError, \ |
tmsg = _("Unable to initialize the XML-RPC interface at %s") % url |
119 |
_("Unable to initialize the XML-RPC interface at %s") % url |
raise GComm.AdapterInitializationError, tmsg |
120 |
|
|
121 |
|
|
122 |
def request(self, service, params={}): |
def request(self, service, params={}): |