Use portage.util.cmp_sort_key for python-3.0 compatibility.
authorZac Medico <zmedico@gentoo.org>
Tue, 3 Feb 2009 00:13:05 +0000 (00:13 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 3 Feb 2009 00:13:05 +0000 (00:13 -0000)
svn path=/main/trunk/; revision=12572

pym/portage/dbapi/__init__.py

index cdae94573307c5b3abbe2d0bcbf63504ccb80d8e..e5db363d7970f37bb70027d5e9b5f88ae496ca9e 100644 (file)
@@ -9,7 +9,7 @@ import re
 from portage.dep import match_from_list
 from portage.locks import unlockfile
 from portage.output import colorize
-from portage.util import writemsg
+from portage.util import writemsg, cmp_sort_key
 from portage import auxdbkeys, dep_expand
 from portage.versions import catpkgsplit, pkgcmp
 
@@ -62,7 +62,7 @@ class dbapi(object):
                                mysplit = tuple(catpkgsplit(cpv)[1:])
                                str_map[mysplit] = cpv
                                cpv_list[i] = mysplit
-                       cpv_list.sort(pkgcmp)
+                       cpv_list.sort(key=cmp_sort_key(pkgcmp))
                        for i, mysplit in enumerate(cpv_list):
                                cpv_list[i] = str_map[mysplit]