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 1RBFq0-0000MS-ON for garchives@archives.gentoo.org; Wed, 05 Oct 2011 00:59:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A805121C027; Wed, 5 Oct 2011 00:59:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 7AA3321C027 for ; Wed, 5 Oct 2011 00:59:48 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D17001B401D for ; Wed, 5 Oct 2011 00:59:47 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 008D380042 for ; Wed, 5 Oct 2011 00:59:47 +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: <3a37b7c5b5d7b70777c67180279f557fd70b52f4.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/util/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/util/whirlpool.py X-VCS-Directories: pym/portage/util/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 3a37b7c5b5d7b70777c67180279f557fd70b52f4 Date: Wed, 5 Oct 2011 00:59:47 +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: b733e12f1d705f8c22f4d396c406c765 commit: 3a37b7c5b5d7b70777c67180279f557fd70b52f4 Author: Zac Medico gentoo org> AuthorDate: Wed Oct 5 00:59:30 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Wed Oct 5 00:59:30 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D3a37b7c5 whirlpool.py: fix for python3 --- pym/portage/util/whirlpool.py | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pym/portage/util/whirlpool.py b/pym/portage/util/whirlpool.p= y index 399958a..c5c2b37 100644 --- a/pym/portage/util/whirlpool.py +++ b/pym/portage/util/whirlpool.py @@ -639,7 +639,8 @@ def WhirlpoolInit(ctx): return =20 def WhirlpoolAdd(source, sourceBits, ctx): - source =3D [ord(s)&0xff for s in source] + if sys.hexversion < 0x3000000: + source =3D [ord(s)&0xff for s in source] =20 carry =3D 0 value =3D sourceBits @@ -785,9 +786,9 @@ def processBuffer(ctx): # =20 if __name__ =3D=3D '__main__': - assert Whirlpool('The quick brown fox jumps over the lazy dog').hexdige= st() =3D=3D \ + assert Whirlpool(b'The quick brown fox jumps over the lazy dog').hexdig= est() =3D=3D \ 'b97de512e91e3828b40d2b0fdce9ceb3c4a71f9bea8d88e75c4fa854df36725fd2b52= eb6544edcacd6f8beddfea403cb55ae31f03ad62a5ef54e42ee82c3fb35' - assert Whirlpool('The quick brown fox jumps over the lazy eog').hexdige= st() =3D=3D \ + assert Whirlpool(b'The quick brown fox jumps over the lazy eog').hexdig= est() =3D=3D \ 'c27ba124205f72e6847f3e19834f925cc666d0974167af915bb462420ed40cc50900d= 85a1f923219d832357750492d5c143011a76988344c2635e69d06f2d38c' - assert Whirlpool('').hexdigest() =3D=3D \ + assert Whirlpool(b'').hexdigest() =3D=3D \ '19fa61d75522a4669b44e39c1d2e1726c530232130d407f89afee0964997f7a73e83b= e698b288febcf88e3e03c4f0757ea8964e59b63d93708b138cc42a66eb3'