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 1PqSPK-0006uK-At for garchives@archives.gentoo.org; Fri, 18 Feb 2011 15:38:10 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7FFD81C021; Fri, 18 Feb 2011 15:38:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 465531C021 for ; Fri, 18 Feb 2011 15:38:03 +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 CB3E41B40A5 for ; Fri, 18 Feb 2011 15:38:02 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 3CAF48006A for ; Fri, 18 Feb 2011 15:38:02 +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: <98e11ed423ef33e433573fea51a941bc9e2f9d0d.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master 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: 98e11ed423ef33e433573fea51a941bc9e2f9d0d Date: Fri, 18 Feb 2011 15:38:02 +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: 9b420f23dd6efa93ff35551dca1a0351 commit: 98e11ed423ef33e433573fea51a941bc9e2f9d0d Author: Zac Medico gentoo org> AuthorDate: Fri Feb 18 15:37:25 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Feb 18 15:37:25 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D98e11ed4 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():