[imp] update lib client version
bzr revid: nicolas.vanhoren@openerp.com-20120110105422-qs4lt4b0pvqm4dzo
This commit is contained in:
parent
420ce20c23
commit
51380071eb
|
@ -50,15 +50,6 @@ class Connector(object):
|
|||
|
||||
__logger = _getChildLogger(_logger, 'connector')
|
||||
|
||||
def __init__(self, hostname, port):
|
||||
"""
|
||||
Initilize by specifying an hostname and a port.
|
||||
:param hostname: Host name of the server.
|
||||
:param port: Port for the connection to the server.
|
||||
"""
|
||||
self.hostname = hostname
|
||||
self.port = port
|
||||
|
||||
def get_service(self, service_name):
|
||||
"""
|
||||
Returns a Service instance to allow easy manipulation of one of the services offered by the remote server.
|
||||
|
@ -81,8 +72,7 @@ class XmlRPCConnector(Connector):
|
|||
:param hostname: The hostname of the computer holding the instance of OpenERP.
|
||||
:param port: The port used by the OpenERP instance for XMLRPC (default to 8069).
|
||||
"""
|
||||
Connector.__init__(self, hostname, port)
|
||||
self.url = 'http://%s:%d/xmlrpc' % (self.hostname, self.port)
|
||||
self.url = 'http://%s:%d/xmlrpc' % (hostname, port)
|
||||
|
||||
def send(self, service_name, method, *args):
|
||||
url = '%s/%s' % (self.url, service_name)
|
||||
|
@ -97,9 +87,9 @@ class XmlRPCSConnector(XmlRPCConnector):
|
|||
|
||||
__logger = _getChildLogger(_logger, 'connector.xmlrpcs')
|
||||
|
||||
def __init__(self, hostname, port=8071):
|
||||
def __init__(self, hostname, port=8069):
|
||||
super(XmlRPCSConnector, self).__init__(hostname, port)
|
||||
self.url = 'https://%s:%d/xmlrpc' % (self.hostname, self.port)
|
||||
self.url = 'https://%s:%d/xmlrpc' % (hostname, port)
|
||||
|
||||
class Service(object):
|
||||
"""
|
||||
|
@ -294,7 +284,7 @@ def get_connector(hostname=None, protocol="xmlrpc", port="auto"):
|
|||
:param port: The number of the port. Defaults to auto.
|
||||
"""
|
||||
if port == 'auto':
|
||||
port = 8069 if protocol=="xmlrpc" else 8071
|
||||
port = 8069
|
||||
if protocol == "xmlrpc":
|
||||
return XmlRPCConnector(hostname, port)
|
||||
elif protocol == "xmlrpcs":
|
||||
|
|
Loading…
Reference in New Issue