[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/common/src/commdrivers/pw_xmlrpc ClientAda...
From: |
Arturas Kriukovas |
Subject: |
gnue/common/src/commdrivers/pw_xmlrpc ClientAda... |
Date: |
Fri, 03 May 2002 13:58:43 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Arturas Kriukovas <address@hidden> 02/05/03 13:58:43
Modified files:
common/src/commdrivers/pw_xmlrpc: ClientAdapter.py
DebugSocketServer.py RpcDoc.py
ServerAdapter.py
Log message:
i18n changes.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/commdrivers/pw_xmlrpc/ClientAdapter.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/commdrivers/pw_xmlrpc/DebugSocketServer.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/commdrivers/pw_xmlrpc/RpcDoc.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/commdrivers/pw_xmlrpc/ServerAdapter.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: gnue/common/src/commdrivers/pw_xmlrpc/ClientAdapter.py
diff -c gnue/common/src/commdrivers/pw_xmlrpc/ClientAdapter.py:1.1
gnue/common/src/commdrivers/pw_xmlrpc/ClientAdapter.py:1.2
*** gnue/common/src/commdrivers/pw_xmlrpc/ClientAdapter.py:1.1 Tue Apr 30
19:52:31 2002
--- gnue/common/src/commdrivers/pw_xmlrpc/ClientAdapter.py Fri May 3
13:58:43 2002
***************
*** 61,68 ****
except ImportError:
raise GComm.AdapterInitializationError, \
! "\nUnable to load xmlrpclib. To use the XML-RPC interface, \n" \
! + "please install xmlrpc from:\n" \
+ " http://www.pythonware.com/products/xmlrpc/"
--- 61,68 ----
except ImportError:
raise GComm.AdapterInitializationError, \
! _("\nUnable to load xmlrpclib. To use the XML-RPC interface, \n") \
! + _("please install xmlrpc from:\n") \
+ " http://www.pythonware.com/products/xmlrpc/"
***************
*** 95,105 ****
except KeyError:
raise GComm.AdapterConfigurationError, \
! "To use XML-RPC, you must either specify a 'url' or\n" +\
! "a 'host' and 'port' setting."
except:
raise GComm.AdapterInitializationError, \
! "Unable to initialize the XML-RPC interface at %s" % url
def request(self, service, params={}):
--- 95,105 ----
except KeyError:
raise GComm.AdapterConfigurationError, \
! _("To use XML-RPC, you must either specify a 'url' or\n") +\
! _("a 'host' and 'port' setting.")
except:
raise GComm.AdapterInitializationError, \
! _("Unable to initialize the XML-RPC interface at %s") % url
def request(self, service, params={}):
Index: gnue/common/src/commdrivers/pw_xmlrpc/DebugSocketServer.py
diff -c gnue/common/src/commdrivers/pw_xmlrpc/DebugSocketServer.py:1.1
gnue/common/src/commdrivers/pw_xmlrpc/DebugSocketServer.py:1.2
*** gnue/common/src/commdrivers/pw_xmlrpc/DebugSocketServer.py:1.1 Tue Apr
30 19:52:31 2002
--- gnue/common/src/commdrivers/pw_xmlrpc/DebugSocketServer.py Fri May 3
13:58:43 2002
***************
*** 46,52 ****
try:
self._port = params['port']
except KeyError:
! raise GComm.AdapterConfigurationError,'Required parameter "port" not
supplied'
# self._tcpserver = SocketServer.TCPServer(('',self._port),
# self._requestHandler)
--- 46,52 ----
try:
self._port = params['port']
except KeyError:
! raise GComm.AdapterConfigurationError, _('Required parameter "port" not
supplied')
# self._tcpserver = SocketServer.TCPServer(('',self._port),
# self._requestHandler)
Index: gnue/common/src/commdrivers/pw_xmlrpc/RpcDoc.py
diff -c gnue/common/src/commdrivers/pw_xmlrpc/RpcDoc.py:1.1
gnue/common/src/commdrivers/pw_xmlrpc/RpcDoc.py:1.2
*** gnue/common/src/commdrivers/pw_xmlrpc/RpcDoc.py:1.1 Tue Apr 30 19:52:31 2002
--- gnue/common/src/commdrivers/pw_xmlrpc/RpcDoc.py Fri May 3 13:58:43 2002
***************
*** 39,45 ****
if command == 'help':
! print "Help goes here"
sys.exit()
elif command == 'doc':
--- 39,45 ----
if command == 'help':
! print _("Help goes here")
sys.exit()
elif command == 'doc':
***************
*** 48,60 ****
rpcdef = GComm.loadDefinition(arguments[0])
except IndexError:
! print "'doc' command expects a .grpc file as its argument."
sys.exit()
gendoc(rpcdef, outfile)
else:
! raise StandardError, "Unrecognized XML-RPC doc command: %s" % command
def gendoc(rpcdef, outfile):
--- 48,60 ----
rpcdef = GComm.loadDefinition(arguments[0])
except IndexError:
! print _("'doc' command expects a .grpc file as its argument.")
sys.exit()
gendoc(rpcdef, outfile)
else:
! raise StandardError, _("Unrecognized XML-RPC doc command: %s") % command
def gendoc(rpcdef, outfile):
Index: gnue/common/src/commdrivers/pw_xmlrpc/ServerAdapter.py
diff -c gnue/common/src/commdrivers/pw_xmlrpc/ServerAdapter.py:1.1
gnue/common/src/commdrivers/pw_xmlrpc/ServerAdapter.py:1.2
*** gnue/common/src/commdrivers/pw_xmlrpc/ServerAdapter.py:1.1 Tue Apr 30
19:52:31 2002
--- gnue/common/src/commdrivers/pw_xmlrpc/ServerAdapter.py Fri May 3
13:58:43 2002
***************
*** 63,70 ****
except ImportError:
raise GComm.AdapterInitializationError, \
! "\nUnable to load xmlrpclib. To use the XML-RPC interface, \n" \
! + "please install xmlrpc from:\n" \
+ " http://www.pythonware.com/products/xmlrpc/"
--- 63,70 ----
except ImportError:
raise GComm.AdapterInitializationError, \
! _("\nUnable to load xmlrpclib. To use the XML-RPC interface, \n") \
! + _("please install xmlrpc from:\n") \
+ " http://www.pythonware.com/products/xmlrpc/"
***************
*** 159,166 ****
else:
! print "Missing Binding information. Please add binding ",\
! "information for ", \
object.binding
# care for bindings in all Services
--- 159,166 ----
else:
! print _("Missing Binding information. Please add binding "),\
! _("information for "), \
object.binding
# care for bindings in all Services
***************
*** 174,186 ****
object.name)
except:
raise AttributeError, \
! "XML-RPC can't bind service '%s' to service '%s'" %\
(object.name,parent.name)
elif parent._type == 'RpGnuRpc':
pass
else:
raise AttributeError, \
! "XML-RPC: cannot bind service '%s' to %s" %\
(object.name,parent._type)
--- 174,186 ----
object.name)
except:
raise AttributeError, \
! _("XML-RPC can't bind service '%s' to service '%s'") %\
(object.name,parent.name)
elif parent._type == 'RpGnuRpc':
pass
else:
raise AttributeError, \
! _("XML-RPC: cannot bind service '%s' to %s") %\
(object.name,parent._type)
***************
*** 216,222 ****
bindto=getattr(parent._realbinding,object.name)
except:
raise AttributeError, \
! "XML-RPC can't bind method '%s' to service '%s'" %\
(object.name,parent.name)
pass
else:
--- 216,222 ----
bindto=getattr(parent._realbinding,object.name)
except:
raise AttributeError, \
! _("XML-RPC can't bind method '%s' to service '%s'") %\
(object.name,parent.name)
pass
else:
***************
*** 303,313 ****
try:
return self.directory[method]['help']
except KeyError:
! return "No help available for %s" % method
else:
# TODO: Is this right? If the requested method is not available?
! self.raiseException('InvalidMethodName',
! 'Requested method does not exist')
def system__methodSignature(self, method):
--- 303,313 ----
try:
return self.directory[method]['help']
except KeyError:
! return _("No help available for %s") % method
else:
# TODO: Is this right? If the requested method is not available?
! self.raiseException(_('InvalidMethodName'),
! _('Requested method does not exist'))
def system__methodSignature(self, method):
***************
*** 318,325 ****
return None
else:
# TODO: Is this right? If the requested method is not available?
! self.raiseException('InvalidMethodName',
! 'Requested method does not exist')
#
# #
# #
--- 318,325 ----
return None
else:
# TODO: Is this right? If the requested method is not available?
! self.raiseException(_('InvalidMethodName'),
! _('Requested method does not exist'))
#
# #
# #
***************
*** 397,403 ****
# Call the requested method
#
def call(self, method, params):
! print "Dispatching: ", method, params
## Check if the Method is part of a service or a pointer to a
## single object
--- 397,403 ----
# Call the requested method
#
def call(self, method, params):
! print _("Dispatching: "), method, params
## Check if the Method is part of a service or a pointer to a
## single object
***************
*** 417,424 ****
method=method[i+2:]
except ValueError:
raise AttributeError, \
! "Wrong format of object handler " \
! "in method call %s" % method
# TODO check in service dir, if obj is supported or not
o=ObjectLibrarian.retrieveObject(objhandle)
server_method=getattr(o,method)
--- 417,424 ----
method=method[i+2:]
except ValueError:
raise AttributeError, \
! _("Wrong format of object handler ") \
! _("in method call %s") % method
# TODO check in service dir, if obj is supported or not
o=ObjectLibrarian.retrieveObject(objhandle)
server_method=getattr(o,method)
***************
*** 431,449 ****
if server_method==None:
raise AttributeError, \
! "Server XML-RPC method %s has is not " \
! "bound to real method" % method
except:
raise AttributeError, \
! "Server does not have XML-RPC " \
! "procedure %s" % method
try:
attr=direntry['signature']
# TODO: Compare submitted attributs with signature
except:
raise AttributeError, \
! "Server XML-RPC " \
! "procedure %s accepts just %s as attributs" % (method,attr)
# replace object handles in param with the real object
counter=0
--- 431,449 ----
if server_method==None:
raise AttributeError, \
! _("Server XML-RPC method %s has is not ") \
! _("bound to real method") % method
except:
raise AttributeError, \
! _("Server does not have XML-RPC ") \
! _("procedure %s") % method
try:
attr=direntry['signature']
# TODO: Compare submitted attributs with signature
except:
raise AttributeError, \
! _("Server XML-RPC ") \
! _("procedure %s accepts just %s as attributs") % (method,attr)
# replace object handles in param with the real object
counter=0
***************
*** 483,490 ****
params[4],params[5],params[6])
else:
raise AttributeError,\
! "Too many param for XML-RPC " \
! "procedure %s" % method
# replace real object in param with an object handle
if type(result)==type(self): ## both should be instances
--- 483,490 ----
params[4],params[5],params[6])
else:
raise AttributeError,\
! _("Too many param for XML-RPC ") \
! _("procedure %s") % method
# replace real object in param with an object handle
if type(result)==type(self): ## both should be instances
***************
*** 527,533 ****
del args['obj_handle']
except KeyError:
! raise StandardError, 'Object handle not returned' # TODO
try:
return ObjectLibrarian. \
--- 527,533 ----
del args['obj_handle']
except KeyError:
! raise StandardError, _('Object handle not returned') # TODO
try:
return ObjectLibrarian. \
***************
*** 535,541 ****
except KeyError:
# Attempt to use an invalid objecthandle
! raise StandardError, 'Invalid object handle' # TODO
--- 535,541 ----
except KeyError:
# Attempt to use an invalid objecthandle
! raise StandardError, _('Invalid object handle') # TODO
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/common/src/commdrivers/pw_xmlrpc ClientAda...,
Arturas Kriukovas <=