From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D70091382D5 for ; Sun, 26 Jun 2016 23:40:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1003E141FC; Sun, 26 Jun 2016 23:40:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B5B4A141FC for ; Sun, 26 Jun 2016 23:40:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3FEC0340CCF for ; Sun, 26 Jun 2016 23:40:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E6502CE6 for ; Sun, 26 Jun 2016 23:40:37 +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: <1466984349.8781a2a86b05cf2bc522fca9a22883844a64fdf6.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/chpathtool.py X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 8781a2a86b05cf2bc522fca9a22883844a64fdf6 X-VCS-Branch: master Date: Sun, 26 Jun 2016 23:40:37 +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: b40379b5-6563-4367-ab4f-34d3f4ba0e30 X-Archives-Hash: 183f2c4c6380e498214cbcfbe19e6cfb commit: 8781a2a86b05cf2bc522fca9a22883844a64fdf6 Author: Zac Medico gentoo org> AuthorDate: Sun Jun 26 23:22:32 2016 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Jun 26 23:39:09 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8781a2a8 chpathtool.py: fix byte comparison logic for python3 (bug 587198) Fix chpathtool.py so that it won't try to compare a byte string with an integer in python3. This change is also compatible with python2. X-Gentoo-Bug: 587198 X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=587198 Acked-by: Brian Dolbec gentoo.org> bin/chpathtool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/chpathtool.py b/bin/chpathtool.py index 73c7a5f..fbd18b9 100755 --- a/bin/chpathtool.py +++ b/bin/chpathtool.py @@ -89,7 +89,7 @@ def chpath_inplace(filename, is_text_file, old, new): if not in_byte: break - if in_byte == old[matched_byte_count]: + if in_byte == old[matched_byte_count:matched_byte_count+1]: matched_byte_count += 1 if matched_byte_count == len_old: modified = True