[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/common/src/commdrivers _directory/Director...
From: |
Arturas Kriukovas |
Subject: |
gnue/common/src/commdrivers _directory/Director... |
Date: |
Sat, 18 Jan 2003 07:48:07 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Arturas Kriukovas <address@hidden> 03/01/18 07:48:06
Modified files:
common/src/commdrivers/_directory: DirectoryServer.py
common/src/commdrivers/_helpers: ObjectEnabler.py
common/src/commdrivers/proxy: CommDriver.py
common/src/commdrivers/pw_xmlrpc: ClientAdapter.py
ServerAdapter.py
common/src/commdrivers/sockets: CommDriver.py
common/src/commdrivers/xmlrpc: ClientAdapter.py RpcDoc.py
ServerAdapter.py
Log message:
i18n changes from raise _(msg) to tmsg=_(msg); raise tmsg
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/commdrivers/_directory/DirectoryServer.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/commdrivers/_helpers/ObjectEnabler.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/commdrivers/proxy/CommDriver.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/commdrivers/pw_xmlrpc/ClientAdapter.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/commdrivers/pw_xmlrpc/ServerAdapter.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/commdrivers/sockets/CommDriver.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/commdrivers/xmlrpc/ClientAdapter.py.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/commdrivers/xmlrpc/RpcDoc.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/commdrivers/xmlrpc/ServerAdapter.py.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
Patches:
Index: gnue/common/src/commdrivers/_directory/DirectoryServer.py
diff -c gnue/common/src/commdrivers/_directory/DirectoryServer.py:1.6
gnue/common/src/commdrivers/_directory/DirectoryServer.py:1.7
*** gnue/common/src/commdrivers/_directory/DirectoryServer.py:1.6 Wed Jan
1 19:45:41 2003
--- gnue/common/src/commdrivers/_directory/DirectoryServer.py Sat Jan 18
07:48:06 2003
***************
*** 139,153 ****
GDebug.printMesg(8,'* %s is bound to \n * %s' % \
(object._path,object._realbinding))
except:
! raise AttributeError, \
! _("GNURPC can't bind service '%s' to service '%s'") %\
! (object.name,parent.name)
elif parent._type == 'RpGnuRpc':
pass
else:
! raise AttributeError, \
! _("GNURPC: cannot bind service '%s' to %s") %\
(object.name,parent._type)
# Compute binding for methods and for attributs
--- 139,153 ----
GDebug.printMesg(8,'* %s is bound to \n * %s' % \
(object._path,object._realbinding))
except:
! tmsg = _("GNURPC can't bind service '%s' to service '%s'") %\
! (object.name,parent.name)
! raise AttributeError, tmsg
elif parent._type == 'RpGnuRpc':
pass
else:
! tmsg = _("GNURPC: cannot bind service '%s' to %s") %\
(object.name,parent._type)
+ raise AttributeError, tmsg
# Compute binding for methods and for attributs
***************
*** 168,176 ****
GDebug.printMesg(8,'* %s is bound to \n * %s' % \
(object._path,bindto))
except:
! raise AttributeError, \
! _("GNURPC can't bind method/attribut '%s' to service
'%s'") %\
! (object.name,parent.name)
pass
else:
bindto=None
--- 168,176 ----
GDebug.printMesg(8,'* %s is bound to \n * %s' % \
(object._path,bindto))
except:
! tmsg = _("GNURPC can't bind method/attribut '%s' to service
'%s'") %\
! (object.name,parent.name)
! raise AttributeError, tmsg
pass
else:
bindto=None
***************
*** 302,315 ****
signature=direntry['signature']
if (server_method==None) and (server_attribute==None):
! raise AttributeError, \
! _("Server XML-RPC method '%s' is not ") % method +\
! _("bound to real method")
except KeyError:
! raise AttributeError, \
! _("Server does not have XML-RPC ") +\
! _("procedure %s") % method
self.checkParamsAgainstSignature(signature,params)
--- 302,315 ----
signature=direntry['signature']
if (server_method==None) and (server_attribute==None):
! tmsg = _("Server XML-RPC method '%s' is not ") % method +\
! _("bound to real method")
! raise AttributeError, tmsg
except KeyError:
! tmsg = _("Server does not have XML-RPC ") +\
! _("procedure %s") % method
! raise AttributeError, tmsg
self.checkParamsAgainstSignature(signature,params)
***************
*** 349,358 ****
# getAttribut method
return server_attribute
else:
! raise AttributeError, \
! _("Internal Server XML-RPC error: method type") +\
! _("(get/set attribute) couldn't be detected (method %s)") \
! % method
#
--- 349,358 ----
# getAttribut method
return server_attribute
else:
! tmsg = _("Internal Server XML-RPC error: method type") +\
! _("(get/set attribute) couldn't be detected (method %s)") \
! % method
! raise AttributeError, tmsg
#
***************
*** 364,372 ****
# TODO: Compare submitted attributs with signature
pass
except KeyError:
! raise AttributeError, \
! _("Server XML-RPC ") +\
! _("procedure %s accepts just %s as attributs") % (method,attr)
--- 364,372 ----
# TODO: Compare submitted attributs with signature
pass
except KeyError:
! tmsg = _("Server XML-RPC ") +\
! _("procedure %s accepts just %s as attributs") % (method,attr)
! raise AttributeError, tmsg
Index: gnue/common/src/commdrivers/_helpers/ObjectEnabler.py
diff -c gnue/common/src/commdrivers/_helpers/ObjectEnabler.py:1.3
gnue/common/src/commdrivers/_helpers/ObjectEnabler.py:1.4
*** gnue/common/src/commdrivers/_helpers/ObjectEnabler.py:1.3 Wed Jan 1
19:45:42 2003
--- gnue/common/src/commdrivers/_helpers/ObjectEnabler.py Sat Jan 18
07:48:06 2003
***************
*** 71,79 ****
objhandle=method[1:i]
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)
--- 71,79 ----
objhandle=method[1:i]
method=method[i+2:]
except ValueError:
! tmsg = _("Wrong format of object handler ")+\
! _("in method call %s") % method
! raise AttributeError, tmsg
# TODO check in service dir, if obj is supported or not
o=ObjectLibrarian.retrieveObject(objhandle)
***************
*** 218,224 ****
del args['obj_handle']
except KeyError:
! raise StandardError, _('Object handle not returned') # TODO
try:
return ObjectLibrarian. \
--- 218,225 ----
del args['obj_handle']
except KeyError:
! tmsg = _('Object handle not returned')
! raise StandardError, tmsg # TODO
try:
return ObjectLibrarian. \
***************
*** 226,230 ****
except KeyError:
# Attempt to use an invalid objecthandle
! raise StandardError, _('Invalid object handle') # TODO
--- 227,232 ----
except KeyError:
# Attempt to use an invalid objecthandle
! tmsg = _('Invalid object handle')
! raise StandardError, tmsg # TODO
Index: gnue/common/src/commdrivers/proxy/CommDriver.py
diff -c gnue/common/src/commdrivers/proxy/CommDriver.py:1.6
gnue/common/src/commdrivers/proxy/CommDriver.py:1.7
*** gnue/common/src/commdrivers/proxy/CommDriver.py:1.6 Wed Jan 1 19:45:42 2003
--- gnue/common/src/commdrivers/proxy/CommDriver.py Sat Jan 18 07:48:06 2003
***************
*** 57,64 ****
try:
self._serverproxy = params['_proxy']
except KeyError:
! raise GComm.AdapterInitializationError, \
! _('Proxy client adapter should be called with the server object')
def request(self, service, params={}):
proxy = _ProxyObject(self, service, \
--- 57,64 ----
try:
self._serverproxy = params['_proxy']
except KeyError:
! tmsg = _('Proxy client adapter should be called with the server
object')
! raise GComm.AdapterInitializationError, tmsg
def request(self, service, params={}):
proxy = _ProxyObject(self, service, \
Index: gnue/common/src/commdrivers/pw_xmlrpc/ClientAdapter.py
diff -c gnue/common/src/commdrivers/pw_xmlrpc/ClientAdapter.py:1.7
gnue/common/src/commdrivers/pw_xmlrpc/ClientAdapter.py:1.8
*** gnue/common/src/commdrivers/pw_xmlrpc/ClientAdapter.py:1.7 Wed Jan 1
19:45:42 2003
--- gnue/common/src/commdrivers/pw_xmlrpc/ClientAdapter.py Sat Jan 18
07:48:06 2003
***************
*** 72,81 ****
from xmlrpclib import xmlrpclib
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/"
##############################################################################
--- 72,81 ----
from xmlrpclib import xmlrpclib
except ImportError:
! tmsg = _("\nUnable to load xmlrpclib. To use the XML-RPC interface, \n") \
+ _("please install xmlrpc from:\n") \
+ " http://www.pythonware.com/products/xmlrpc/"
+ raise GComm.AdapterInitializationError, tmsg
##############################################################################
***************
*** 111,122 ****
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={}):
--- 111,122 ----
except KeyError:
! tmsg = _("To use XML-RPC, you must either specify a 'url' or\n") +\
_("a 'host' and 'port' setting.")
+ raise GComm.AdapterConfigurationError, tmsg
except:
! tmsg = _("Unable to initialize the XML-RPC interface at %s") % url
! raise GComm.AdapterInitializationError, tmsg
def request(self, service, params={}):
Index: gnue/common/src/commdrivers/pw_xmlrpc/ServerAdapter.py
diff -c gnue/common/src/commdrivers/pw_xmlrpc/ServerAdapter.py:1.6
gnue/common/src/commdrivers/pw_xmlrpc/ServerAdapter.py:1.7
*** gnue/common/src/commdrivers/pw_xmlrpc/ServerAdapter.py:1.6 Wed Jan 1
19:45:42 2003
--- gnue/common/src/commdrivers/pw_xmlrpc/ServerAdapter.py Sat Jan 18
07:48:06 2003
***************
*** 64,74 ****
from xmlrpclib import xmlrpclib
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/"
!
# Mapping from GRPC's datatype to XML-RPC datatypes
--- 64,73 ----
from xmlrpclib import xmlrpclib
except ImportError:
! tmsg = _("\nUnable to load xmlrpclib. To use the XML-RPC interface, \n") \
+ _("please install xmlrpc from:\n") \
+ " http://www.pythonware.com/products/xmlrpc/"
! raise GComm.AdapterInitializationError, tmsg
# Mapping from GRPC's datatype to XML-RPC datatypes
***************
*** 118,124 ****
try:
self._port = params['port']
except KeyError:
! raise GComm.AdapterConfigurationError, _('Required parameter "port" not
supplied')
if hasattr(params,'loglevel'):
self._loglevel = params['loglevel']
--- 117,124 ----
try:
self._port = params['port']
except KeyError:
! tmsg = _('Required parameter "port" not supplied')
! raise GComm.AdapterConfigurationError, tmsg
if hasattr(params,'loglevel'):
self._loglevel = params['loglevel']
***************
*** 183,191 ****
objhandle=method[1:i]
method=method[i+2:]
except ValueError:
! raise AttributeError, \
! _("Wrong format of object handle ")+\
_("in method call %s") % method
# TODO check in service dir, if obj is supported or not
o=ObjectLibrarian.retrieveObject(objhandle)
try:
--- 183,191 ----
objhandle=method[1:i]
method=method[i+2:]
except ValueError:
! tmsg = _("Wrong format of object handle ")+\
_("in method call %s") % method
+ raise AttributeError, tmsg
# TODO check in service dir, if obj is supported or not
o=ObjectLibrarian.retrieveObject(objhandle)
try:
***************
*** 230,250 ****
signature=direntry['signature']
if (server_method==None) and (server_attribute==None):
! raise AttributeError, \
! _("Server XML-RPC method %s is not ")% method +\
_("bound to real method")
except KeyError:
! raise AttributeError, \
! _("Server does not have XML-RPC ") +\
_("procedure %s") % method
try:
#
pass
# TODO: Compare submitted attributs with signature
except KeyError:
! raise AttributeError, \
! _("Server XML-RPC ") +\
_("procedure %s accepts just %s as attributs") % (method,attr)
# replace object handles in param with the real object
--- 230,250 ----
signature=direntry['signature']
if (server_method==None) and (server_attribute==None):
! tmsg = _("Server XML-RPC method %s is not ")% method +\
_("bound to real method")
+ raise AttributeError, tmsg
except KeyError:
! tmsg = _("Server does not have XML-RPC ") +\
_("procedure %s") % method
+ raise AttributeError, tmsg
try:
#
pass
# TODO: Compare submitted attributs with signature
except KeyError:
! tmsg = _("Server XML-RPC ") +\
_("procedure %s accepts just %s as attributs") % (method,attr)
+ raise AttributeError, tmsg
# replace object handles in param with the real object
***************
*** 291,300 ****
# getAttribut method
result=server_attribute
else:
! raise AttributeError, \
! _("Internal Server XML-RPC error: method type") +\
_("(get/set attribute) couldn't be detected (method %s)") \
% method
# replace real object in param with an object handle
--- 291,300 ----
# getAttribut method
result=server_attribute
else:
! tmsg = _("Internal Server XML-RPC error: method type") +\
_("(get/set attribute) couldn't be detected (method %s)") \
% method
+ raise AttributeError, tmsg
# replace real object in param with an object handle
***************
*** 449,455 ****
del args['obj_handle']
except KeyError:
! raise StandardError, _('Object handle not returned') # TODO
try:
return ObjectLibrarian. \
--- 449,456 ----
del args['obj_handle']
except KeyError:
! tmsg = _('Object handle not returned')
! raise StandardError, tmsg # TODO
try:
return ObjectLibrarian. \
***************
*** 457,463 ****
except KeyError:
# Attempt to use an invalid objecthandle
! raise StandardError, _('Invalid object handle') # TODO
--- 458,465 ----
except KeyError:
# Attempt to use an invalid objecthandle
! tmsg = _('Invalid object handle')
! raise StandardError, tmsg # TODO
Index: gnue/common/src/commdrivers/sockets/CommDriver.py
diff -c gnue/common/src/commdrivers/sockets/CommDriver.py:1.6
gnue/common/src/commdrivers/sockets/CommDriver.py:1.7
*** gnue/common/src/commdrivers/sockets/CommDriver.py:1.6 Wed Jan 1
19:45:42 2003
--- gnue/common/src/commdrivers/sockets/CommDriver.py Sat Jan 18 07:48:06 2003
***************
*** 81,89 ****
raise KeyError
if not hasattr(socket, 'AF_UNIX'):
! raise GComm.AdapterConfigurationError, \
! _("Your configuration references a file-based sockets
connection.\n") \
! + _("However, your operating system does not support file-based
sockets.")
self._location = file
--- 81,89 ----
raise KeyError
if not hasattr(socket, 'AF_UNIX'):
! tmsg = _("Your configuration references a file-based sockets
connection.\n") \
! + _("However, your operating system does not support
file-based sockets.")
! raise GComm.AdapterConfigurationError, tmsg
self._location = file
***************
*** 93,101 ****
self.__socket.connect(file)
except:
! raise AdapterInitializationError, \
! _("Unable to initialize the requested socket located at %s") % \
! (file)
except KeyError:
--- 93,101 ----
self.__socket.connect(file)
except:
! tmsg = _("Unable to initialize the requested socket located at %s")
% \
! (file)
! raise AdapterInitializationError, tmsg
except KeyError:
***************
*** 110,123 ****
self.__socket.connect((host, port))
except KeyError:
! raise GComm.AdapterConfigurationError, \
! _("To use the sockets commdriver, you must specify either a
sockets") \
! + _("\nfile or a host and port number. Please see documentation.")
except:
! raise AdapterInitializationError, \
! _("Unable to initialize the requested socket located at %s:%s") % \
! (host,port)
def __repr__(self):
--- 110,123 ----
self.__socket.connect((host, port))
except KeyError:
! tmsg = _("To use the sockets commdriver, you must specify either a
sockets") \
! + _("\nfile or a host and port number. Please see
documentation.")
! raise GComm.AdapterConfigurationError, tmsg
except:
! tmsg = _("Unable to initialize the requested socket located at
%s:%s") % \
! (host,port)
! raise AdapterInitializationError, tmsg
def __repr__(self):
Index: gnue/common/src/commdrivers/xmlrpc/ClientAdapter.py
diff -c gnue/common/src/commdrivers/xmlrpc/ClientAdapter.py:1.13
gnue/common/src/commdrivers/xmlrpc/ClientAdapter.py:1.14
*** gnue/common/src/commdrivers/xmlrpc/ClientAdapter.py:1.13 Wed Jan 1
19:45:42 2003
--- gnue/common/src/commdrivers/xmlrpc/ClientAdapter.py Sat Jan 18 07:48:06 2003
***************
*** 71,81 ****
from xmlrpc import xmlrpc
except ImportError:
! raise GComm.AdapterInitializationError, \
! _("\nUnable to load xmlrpc. To use the XML-RPC interface, \n") \
! + _("please install xmlrpc from:\n") \
! + " http://sourceforge.net/projects/py-xmlrpc " \
! + _("the appropriate DEBIAN package is python-xmlrpc.deb")
##############################################################################
--- 71,81 ----
from xmlrpc import xmlrpc
except ImportError:
! tmsg = _("\nUnable to load xmlrpc. To use the XML-RPC interface, \n") \
! + _("please install xmlrpc from:\n") \
! + " http://sourceforge.net/projects/py-xmlrpc " \
! + _("the appropriate DEBIAN package is python-xmlrpc.deb")
! raise GComm.AdapterInitializationError, tmsg
##############################################################################
***************
*** 119,128 ****
transport = 'http'
if (transport!='http'):
! raise GComm.AdapterConfigurationError, \
! "py-xmlrpc just support http as a transport. " +\
! "If you need https please have a look at the " +\
! "'pw_xmlrpc' adapter."
#
# path parameter
#
--- 119,128 ----
transport = 'http'
if (transport!='http'):
! tmsg = _("py-xmlrpc just support http as a transport. ") +\
! _("If you need https please have a look at the ") +\
! _("'pw_xmlrpc' adapter.")
! raise GComm.AdapterConfigurationError, tmsg
#
# path parameter
#
***************
*** 173,184 ****
# self._client.setOnErr(self.errorHandler)
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={}):
--- 173,184 ----
# self._client.setOnErr(self.errorHandler)
except KeyError:
! tmsg = _("To use XML-RPC, you must either specify a 'url' or\n") +\
! _("a 'host' and 'port' setting.")
! raise GComm.AdapterConfigurationError, tmsg
except:
! tmsg = _("Unable to initialize the XML-RPC interface at %s") % url
! raise GComm.AdapterInitializationError, tmsg
def request(self, service, params={}):
Index: gnue/common/src/commdrivers/xmlrpc/RpcDoc.py
diff -c gnue/common/src/commdrivers/xmlrpc/RpcDoc.py:1.7
gnue/common/src/commdrivers/xmlrpc/RpcDoc.py:1.8
*** gnue/common/src/commdrivers/xmlrpc/RpcDoc.py:1.7 Wed Jan 1 19:45:42 2003
--- gnue/common/src/commdrivers/xmlrpc/RpcDoc.py Sat Jan 18 07:48:06 2003
***************
*** 117,123 ****
gendocJS(rpcdef, outfile)
else:
! raise StandardError, _("Unrecognized XML-RPC doc command: %s") % command
##
## Create normal documentation
--- 117,124 ----
gendocJS(rpcdef, outfile)
else:
! tmsg = _("Unrecognized XML-RPC doc command: %s") % command
! raise StandardError, tmsg
##
## Create normal documentation
Index: gnue/common/src/commdrivers/xmlrpc/ServerAdapter.py
diff -c gnue/common/src/commdrivers/xmlrpc/ServerAdapter.py:1.18
gnue/common/src/commdrivers/xmlrpc/ServerAdapter.py:1.19
*** gnue/common/src/commdrivers/xmlrpc/ServerAdapter.py:1.18 Wed Jan 1
19:45:42 2003
--- gnue/common/src/commdrivers/xmlrpc/ServerAdapter.py Sat Jan 18 07:48:06 2003
***************
*** 57,67 ****
import xmlrpc
except ImportError:
! raise GComm.AdapterInitializationError, \
! _("\nUnable to load xmlrpc. To use the XML-RPC interface, \n") \
! + _("please install xmlrpc from:\n") \
! + " http://sourceforge.net/projects/py-xmlrpc" \
! + _("the appropriate DEBIAN package is python-xmlrpc")
# Mapping from GRPC's datatype to XML-RPC datatypes
--- 57,67 ----
import xmlrpc
except ImportError:
! tmsg = _("\nUnable to load xmlrpc. To use the XML-RPC interface, \n") \
! + _("please install xmlrpc from:\n") \
! + " http://sourceforge.net/projects/py-xmlrpc" \
! + _("the appropriate DEBIAN package is python-xmlrpc")
! raise GComm.AdapterInitializationError, tmsg
# Mapping from GRPC's datatype to XML-RPC datatypes
***************
*** 88,95 ****
try:
self._port = params['port']
except KeyError:
! raise GComm.AdapterConfigurationError,\
! _('Required parameter "port" not supplied')
# Create Subserver
self.server=XMLRPC_Server()
--- 88,95 ----
try:
self._port = params['port']
except KeyError:
! tmsg = _('Required parameter "port" not supplied')
! raise GComm.AdapterConfigurationError, tmsg
# Create Subserver
self.server=XMLRPC_Server()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/common/src/commdrivers _directory/Director...,
Arturas Kriukovas <=