]> git.pld-linux.org Git - packages/xen.git/commitdiff
- fix for python27
authormarcus <marcus@pld-linux.org>
Sat, 22 Jan 2011 07:29:00 +0000 (07:29 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    xen-python27.patch -> 1.1

xen-python27.patch [new file with mode: 0644]

diff --git a/xen-python27.patch b/xen-python27.patch
new file mode 100644 (file)
index 0000000..1d96886
--- /dev/null
@@ -0,0 +1,36 @@
+--- xen-4.0.1/tools/python/xen/util/xmlrpcclient.py.orig       2010-02-02 20:43:01.000000000 +0000
++++ xen-4.0.1/tools/python/xen/util/xmlrpcclient.py    2010-08-18 21:36:05.000000000 +0100
+@@ -22,6 +22,7 @@
+ import string
+ import xmlrpclib
+ from types import StringTypes
++from sys import hexversion
+ try:
+@@ -54,7 +55,12 @@
+         return xmlrpclib.Transport.request(self, host, '/RPC2',
+                                            request_body, verbose)
+     def make_connection(self, host):
+-        return HTTPUnix(self.__handler)
++        if hexversion < 0x02070000:
++            # python 2.6 or earlier
++            return HTTPUnix(self.__handler)
++        else:
++            # xmlrpclib.Transport changed in python 2.7
++            return HTTPUnixConnection(self.__handler)
+ # We need our own transport for HTTPS, because xmlrpclib.SafeTransport is
+--- xen-4.0.1/tools/python/xen/util/xmlrpclib2.py.orig 2010-02-02 20:43:01.000000000 +0000
++++ xen-4.0.1/tools/python/xen/util/xmlrpclib2.py      2010-08-18 21:35:40.000000000 +0100
+@@ -58,6 +58,9 @@
+ # some bugs in Keep-Alive handling and also enabled it by default
+ class XMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
+     protocol_version = "HTTP/1.1"
++    # xend crashes in python 2.7 unless disable_nagle_algorithm = False
++    # it isn't used in earlier versions so it is harmless to set it generally
++    disable_nagle_algorithm = False
+     def __init__(self, hosts_allowed, request, client_address, server):
+         self.hosts_allowed = hosts_allowed
This page took 0.132278 seconds and 4 git commands to generate.