debuggers.hg
changeset 19997:69cd50c86a79
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>
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>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Mon Jul 20 10:09:00 2009 +0100 (2009-07-20) |
parents | ad5a697d701a |
children | 62b7fc245d1f |
files | tools/python/xen/util/pci.py |
line diff
1.1 --- a/tools/python/xen/util/pci.py Mon Jul 20 10:08:12 2009 +0100 1.2 +++ b/tools/python/xen/util/pci.py Mon Jul 20 10:09:00 2009 +0100 1.3 @@ -310,7 +310,7 @@ def parse_pci_name_extended(pci_dev_str) 1.4 # By arranging things so that virtual function 0 is first, 1.5 # attachemnt can use the returned list as is. And detachment 1.6 # can just reverse the list. 1.7 - pci.sort(None, lambda x: int(x['vdevfn'], 16), 1) 1.8 + pci.sort(lambda x,y: cmp(int(y['vdevfn'], 16), int(x['vdevfn'], 16))) 1.9 return pci 1.10 1.11 def parse_pci_name(pci_name_string):