5a49a4e63b
22045-python27-compat.patch Thu Nov 11 18:44:48 CST 2010 - cyliu@novell.com - bnc#641144 - FV Xen VM running windows or linux cannot write to virtual floppy drive bdrv_default_rwflag.patch - fate#310510 - fix xenpaging xenpaging.optimize_p2m_mem_paging_populate.patch xenpaging.HVMCOPY_gfn_paged_out.patch - bnc#649864 - automatic numa cpu placement of xen conflicts with cpupools 22326-cpu-pools-numa-placement.patch - fate#310510 - fix xenpaging xenpaging.populate_only_if_paged.patch - revert logic, populate needs to happen unconditionally xenpaging.p2m_mem_paging_populate_if_p2m_ram_paged.patch - invalidate current mfn only if gfn is not in flight or done xenpaging.mem_event_check_ring-free_requests.patch - print info only if 1 instead of 2 slots are free xenpaging.guest_remove_page.patch - check mfn before usage in resume function xenpaging.machine_to_phys_mapping.patch - check mfn before usage in resume function - bnc#552115 - Remove target discovery in block-iscsi OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=82
56 lines
2.2 KiB
Diff
56 lines
2.2 KiB
Diff
# HG changeset patch
|
|
# User Michael Young <m.a.young@durham.ac.uk>
|
|
# Date 1282234170 -3600
|
|
# Node ID 2940165380de2348e0ea3f628dea35750a2b4c8f
|
|
# Parent 60746a2c14a6cc123892f973fbdd6acb73251d39
|
|
tools/python: fix xm list for Python 2.7
|
|
|
|
This patch fixes
|
|
Unexpected error: <type 'exceptions.AttributeError'>
|
|
This is due to xmlrpc changes in Python 2.7. This patch should
|
|
fixe it for both old and new versions.
|
|
|
|
Signed-off-by: Michael Young <m.a.young@durham.ac.uk>
|
|
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
|
|
|
|
Index: xen-4.0.1-testing/tools/python/xen/util/xmlrpcclient.py
|
|
===================================================================
|
|
--- xen-4.0.1-testing.orig/tools/python/xen/util/xmlrpcclient.py
|
|
+++ xen-4.0.1-testing/tools/python/xen/util/xmlrpcclient.py
|
|
@@ -22,6 +22,7 @@ import socket
|
|
import string
|
|
import xmlrpclib
|
|
from types import StringTypes
|
|
+from sys import hexversion
|
|
|
|
|
|
try:
|
|
@@ -54,7 +55,12 @@ class UnixTransport(xmlrpclib.Transport)
|
|
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
|
|
Index: xen-4.0.1-testing/tools/python/xen/util/xmlrpclib2.py
|
|
===================================================================
|
|
--- xen-4.0.1-testing.orig/tools/python/xen/util/xmlrpclib2.py
|
|
+++ xen-4.0.1-testing/tools/python/xen/util/xmlrpclib2.py
|
|
@@ -58,6 +58,9 @@ def stringify(value):
|
|
# 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
|