Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/
Date: Sun, 26 Jun 2016 23:40:43
Message-Id: 1466984349.8781a2a86b05cf2bc522fca9a22883844a64fdf6.zmedico@gentoo
1 commit: 8781a2a86b05cf2bc522fca9a22883844a64fdf6
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 26 23:22:32 2016 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sun Jun 26 23:39:09 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8781a2a8
7
8 chpathtool.py: fix byte comparison logic for python3 (bug 587198)
9
10 Fix chpathtool.py so that it won't try to compare a byte string with an
11 integer in python3. This change is also compatible with python2.
12
13 X-Gentoo-Bug: 587198
14 X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=587198
15 Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>
16
17 bin/chpathtool.py | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20 diff --git a/bin/chpathtool.py b/bin/chpathtool.py
21 index 73c7a5f..fbd18b9 100755
22 --- a/bin/chpathtool.py
23 +++ b/bin/chpathtool.py
24 @@ -89,7 +89,7 @@ def chpath_inplace(filename, is_text_file, old, new):
25 if not in_byte:
26 break
27
28 - if in_byte == old[matched_byte_count]:
29 + if in_byte == old[matched_byte_count:matched_byte_count+1]:
30 matched_byte_count += 1
31 if matched_byte_count == len_old:
32 modified = True