Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/
Date: Sun, 22 Oct 2017 22:33:53
Message-Id: 1508711582.5575570894c064976f701831d5a15bfa7f529935.zmedico@gentoo
1 commit: 5575570894c064976f701831d5a15bfa7f529935
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 22 22:30:15 2017 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 22 22:33:02 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=55755708
7
8 is_prelinkable_elf: fix for python3 (bug 635116)
9
10 Change magic[16] to magic[16:17], since magic[16] returns
11 an integer for python3.
12
13 Bug: https://bugs.gentoo.org/635116
14
15 pym/portage/checksum.py | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18 diff --git a/pym/portage/checksum.py b/pym/portage/checksum.py
19 index ad090ddb3..5424ce56b 100644
20 --- a/pym/portage/checksum.py
21 +++ b/pym/portage/checksum.py
22 @@ -315,7 +315,7 @@ def is_prelinkable_elf(filename):
23 finally:
24 f.close()
25 return (len(magic) == 17 and magic.startswith(b'\x7fELF') and
26 - magic[16] in (b'\x02', b'\x03')) # 2=ET_EXEC, 3=ET_DYN
27 + magic[16:17] in (b'\x02', b'\x03')) # 2=ET_EXEC, 3=ET_DYN
28
29 def perform_md5(x, calc_prelink=0):
30 return perform_checksum(x, "MD5", calc_prelink)[0]