commit: 5575570894c064976f701831d5a15bfa7f529935 Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Sun Oct 22 22:30:15 2017 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> 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]