commit: 8781a2a86b05cf2bc522fca9a22883844a64fdf6 Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Sun Jun 26 23:22:32 2016 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> 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 <dolsen <AT> 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