From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PqwnW-0003JN-1y for garchives@archives.gentoo.org; Sun, 20 Feb 2011 00:05:10 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 72ABE1C062; Sun, 20 Feb 2011 00:04:18 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 3A7DA1C062 for ; Sun, 20 Feb 2011 00:04:18 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EB6B11B4033 for ; Sun, 20 Feb 2011 00:04:17 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 5DCF280074 for ; Sun, 20 Feb 2011 00:04:17 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <7ef8b7dd49d103a6545d70a39398a56c2dbe138b.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:2.1.9 commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/egencache X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 7ef8b7dd49d103a6545d70a39398a56c2dbe138b Date: Sun, 20 Feb 2011 00:04:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: e6f31385bd5963417755e1303d5ac8a6 commit: 7ef8b7dd49d103a6545d70a39398a56c2dbe138b Author: Zac Medico gentoo org> AuthorDate: Fri Feb 18 15:37:25 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Feb 20 00:02:25 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D7ef8b7dd egencache: fix cmp_func for python3 --- bin/egencache | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/bin/egencache b/bin/egencache index e5685c4..5307cd5 100755 --- a/bin/egencache +++ b/bin/egencache @@ -455,6 +455,14 @@ class GenUseLocalDesc(object): # since we don't want any confusion given that we never # want to rely on the builtin cmp function. def cmp_func(a, b): + if a is None or b is None: + # None can't be compared with other types in python3. + if a is None and b is None: + return 0 + elif a is None: + return -1 + else: + return 1 return (a > b) - (a < b) =20 for cp in self._portdb.cp_all():