mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
xend: modify sort() for Python 2.3
Python 2.3 does not support the sort(cmp, key, reverse) style. Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
be8cd315f1
commit
bd9dfffdcb
1 file changed
+1
-1
@@ -310,7 +310,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):
|
||||
|
||||