From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6F1F51396D9 for ; Sun, 22 Oct 2017 22:33:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 845C32BC003; Sun, 22 Oct 2017 22:33:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 600422BC003 for ; Sun, 22 Oct 2017 22:33:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 008E233BEAC for ; Sun, 22 Oct 2017 22:33:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4968D309 for ; Sun, 22 Oct 2017 22:33:48 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1508711582.5575570894c064976f701831d5a15bfa7f529935.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/checksum.py X-VCS-Directories: pym/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 5575570894c064976f701831d5a15bfa7f529935 X-VCS-Branch: master Date: Sun, 22 Oct 2017 22:33:48 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 8a57f3c9-ad1b-4e24-b44f-1b21f24a10d1 X-Archives-Hash: eaa1238e1b99df4ebab18ad79c34e0c2 commit: 5575570894c064976f701831d5a15bfa7f529935 Author: Zac Medico gentoo org> AuthorDate: Sun Oct 22 22:30:15 2017 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Oct 22 22:33:02 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=55755708 is_prelinkable_elf: fix for python3 (bug 635116) Change magic[16] to magic[16:17], since magic[16] returns an integer for python3. Bug: https://bugs.gentoo.org/635116 pym/portage/checksum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/portage/checksum.py b/pym/portage/checksum.py index ad090ddb3..5424ce56b 100644 --- a/pym/portage/checksum.py +++ b/pym/portage/checksum.py @@ -315,7 +315,7 @@ def is_prelinkable_elf(filename): finally: f.close() return (len(magic) == 17 and magic.startswith(b'\x7fELF') and - magic[16] in (b'\x02', b'\x03')) # 2=ET_EXEC, 3=ET_DYN + magic[16:17] in (b'\x02', b'\x03')) # 2=ET_EXEC, 3=ET_DYN def perform_md5(x, calc_prelink=0): return perform_checksum(x, "MD5", calc_prelink)[0]