Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 369615 | Differences between
and this patch

Collapse All | Expand All

(-)xen-4.0.1/tools/python/xen/util/xmlrpcclient.py.orig (-1 / +7 lines)
Lines 22-27 Link Here
22
import string
22
import string
23
import xmlrpclib
23
import xmlrpclib
24
from types import StringTypes
24
from types import StringTypes
25
from sys import hexversion
25
26
26
27
27
try:
28
try:
Lines 54-60 Link Here
54
        return xmlrpclib.Transport.request(self, host, '/RPC2',
55
        return xmlrpclib.Transport.request(self, host, '/RPC2',
55
                                           request_body, verbose)
56
                                           request_body, verbose)
56
    def make_connection(self, host):
57
    def make_connection(self, host):
57
        return HTTPUnix(self.__handler)
58
        if hexversion < 0x02070000:
59
            # python 2.6 or earlier
60
            return HTTPUnix(self.__handler)
61
        else:
62
            # xmlrpclib.Transport changed in python 2.7
63
            return HTTPUnixConnection(self.__handler)
58
64
59
65
60
# We need our own transport for HTTPS, because xmlrpclib.SafeTransport is
66
# We need our own transport for HTTPS, because xmlrpclib.SafeTransport is
(-)xen-4.0.1/tools/python/xen/util/xmlrpclib2.py.orig (+3 lines)
Lines 58-63 Link Here
58
# some bugs in Keep-Alive handling and also enabled it by default
58
# some bugs in Keep-Alive handling and also enabled it by default
59
class XMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
59
class XMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
60
    protocol_version = "HTTP/1.1"
60
    protocol_version = "HTTP/1.1"
61
    # xend crashes in python 2.7 unless disable_nagle_algorithm = False
62
    # it isn't used in earlier versions so it is harmless to set it generally
63
    disable_nagle_algorithm = False
61
64
62
    def __init__(self, hosts_allowed, request, client_address, server):
65
    def __init__(self, hosts_allowed, request, client_address, server):
63
        self.hosts_allowed = hosts_allowed
66
        self.hosts_allowed = hosts_allowed

Return to bug 369615