diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-07-20 10:09:00 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-07-20 10:09:00 +0100 |
commit | bd9dfffdcb72739db811140c3056d409c1a955d9 (patch) | |
tree | 99b52262141d65ccb79e658b504921512a3f35ac | |
parent | be8cd315f1599736d07018655b48a8a132479b8a (diff) | |
download | xen-bd9dfffdcb72739db811140c3056d409c1a955d9.tar.gz xen-bd9dfffdcb72739db811140c3056d409c1a955d9.tar.bz2 xen-bd9dfffdcb72739db811140c3056d409c1a955d9.zip |
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>
-rw-r--r-- | tools/python/xen/util/pci.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/python/xen/util/pci.py b/tools/python/xen/util/pci.py index e651d5c544..de5e619f41 100644 --- a/tools/python/xen/util/pci.py +++ b/tools/python/xen/util/pci.py @@ -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): |