[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [XEND] Make logging an optional parameter for the XMLRPCServer
# HG changeset patch # User Alastair Tse <atse@xxxxxxxxxxxxx> # Node ID 52bf7bbb0f363a5d36004c78f501d1dd3270670d # Parent ccfc8e4148b29c274ce54f8ef261a3a216c12bb0 [XEND] Make logging an optional parameter for the XMLRPCServer Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx> --- tools/python/xen/util/xmlrpclib2.py | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff -r ccfc8e4148b2 -r 52bf7bbb0f36 tools/python/xen/util/xmlrpclib2.py --- a/tools/python/xen/util/xmlrpclib2.py Thu Oct 05 17:29:19 2006 +0100 +++ b/tools/python/xen/util/xmlrpclib2.py Thu Oct 05 17:29:19 2006 +0100 @@ -25,7 +25,6 @@ import fcntl import fcntl from httplib import HTTPConnection, HTTP -from xmlrpclib import Transport from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler import SocketServer import xmlrpclib, socket, os, stat @@ -81,10 +80,11 @@ class HTTPUnix(HTTP): class HTTPUnix(HTTP): _connection_class = HTTPUnixConnection -class UnixTransport(Transport): +class UnixTransport(xmlrpclib.Transport): def request(self, host, handler, request_body, verbose=0): self.__handler = handler - return Transport.request(self, host, '/RPC2', request_body, verbose) + return xmlrpclib.Transport.request(self, host, '/RPC2', + request_body, verbose) def make_connection(self, host): return HTTPUnix(self.__handler) @@ -134,7 +134,7 @@ class TCPXMLRPCServer(SocketServer.Threa allow_reuse_address = True def __init__(self, addr, requestHandler=XMLRPCRequestHandler, - logRequests=1): + logRequests = 1): SimpleXMLRPCServer.__init__(self, addr, requestHandler, logRequests) flags = fcntl.fcntl(self.fileno(), fcntl.F_GETFD) @@ -201,7 +201,7 @@ class UnixXMLRPCServer(TCPXMLRPCServer): class UnixXMLRPCServer(TCPXMLRPCServer): address_family = socket.AF_UNIX - def __init__(self, addr, logRequests): + def __init__(self, addr, logRequests = 1): parent = os.path.dirname(addr) if os.path.exists(parent): os.chown(parent, os.geteuid(), os.getegid()) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |