]> git.pld-linux.org Git - packages/xen.git/blame - xen-python27.patch
- s/success/ok/g and s/failure/fail/g - for PLD functions
[packages/xen.git] / xen-python27.patch
CommitLineData
4d57382f 1--- xen-4.0.1/tools/python/xen/util/xmlrpcclient.py.orig 2010-02-02 20:43:01.000000000 +0000
2+++ xen-4.0.1/tools/python/xen/util/xmlrpcclient.py 2010-08-18 21:36:05.000000000 +0100
3@@ -22,6 +22,7 @@
4 import string
5 import xmlrpclib
6 from types import StringTypes
7+from sys import hexversion
8
9
10 try:
11@@ -54,7 +55,12 @@
12 return xmlrpclib.Transport.request(self, host, '/RPC2',
13 request_body, verbose)
14 def make_connection(self, host):
15- return HTTPUnix(self.__handler)
16+ if hexversion < 0x02070000:
17+ # python 2.6 or earlier
18+ return HTTPUnix(self.__handler)
19+ else:
20+ # xmlrpclib.Transport changed in python 2.7
21+ return HTTPUnixConnection(self.__handler)
22
23
24 # We need our own transport for HTTPS, because xmlrpclib.SafeTransport is
25--- xen-4.0.1/tools/python/xen/util/xmlrpclib2.py.orig 2010-02-02 20:43:01.000000000 +0000
26+++ xen-4.0.1/tools/python/xen/util/xmlrpclib2.py 2010-08-18 21:35:40.000000000 +0100
27@@ -58,6 +58,9 @@
28 # some bugs in Keep-Alive handling and also enabled it by default
29 class XMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
30 protocol_version = "HTTP/1.1"
31+ # xend crashes in python 2.7 unless disable_nagle_algorithm = False
32+ # it isn't used in earlier versions so it is harmless to set it generally
33+ disable_nagle_algorithm = False
34
35 def __init__(self, hosts_allowed, request, client_address, server):
36 self.hosts_allowed = hosts_allowed
This page took 0.069754 seconds and 4 git commands to generate.