Hi,
Python 2.3 do not support the sort(cmp, key, reverse) style.
Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
--
KUWAMURA Shin'ya
# HG changeset patch
# User KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
# Date 1247805279 -32400
# Node ID 8c52a43e7385a344619644148d930d1eabc0068c
# Parent 3d7be8ff7ad9e48cdd08517a8303e86f0090522b
xend: modify sort() for Python 2.3
Python 2.3 do not support the sort(cmp, key, reverse) style.
Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
diff -r 3d7be8ff7ad9 -r 8c52a43e7385 tools/python/xen/util/pci.py
--- a/tools/python/xen/util/pci.py Fri Jul 17 13:22:03 2009 +0900
+++ b/tools/python/xen/util/pci.py Fri Jul 17 13:34:39 2009 +0900
@@ -307,7 +307,7 @@ def parse_pci_name_extended(pci_dev_str)
# By arranging things so that virtual function 0 is first,
# attachemnt can use the returned list as is. And detachment
# can just reverse the list.
- pci.sort(None, lambda x: int(x['vdevfn'], 16), 1)
+ pci.sort(lambda x,y: cmp(int(y['vdevfn'], 16), int(x['vdevfn'], 16)))
return pci
def parse_pci_name(pci_name_string):
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|