From 83a3227b62c936b346b825b333fc2ca65528ecfd Mon Sep 17 00:00:00 2001 From: Jiri Tyr Date: Thu, 6 Feb 2020 16:32:46 +0000 Subject: [PATCH] Fixing forall subcommand for Py3 Execution of 'repo forall -p -c' doesn't work with Py3 and ends up with an error: Got an error, terminating the pool: TypeError: can only concatenate str (not "bytes") to str That's fixed by using the decode() method. Change-Id: Ice01aaa1822dde8d957b5bf096021dd5a2b7dd51 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/253659 Reviewed-by: Mike Frysinger Reviewed-by: David Pursehouse Tested-by: Jiri Tyr --- subcmds/forall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subcmds/forall.py b/subcmds/forall.py index 96eac541..131ba676 100644 --- a/subcmds/forall.py +++ b/subcmds/forall.py @@ -366,7 +366,7 @@ def DoWork(project, mirror, opt, cmd, shell, cnt, config): while not s_in.is_done: in_ready = s_in.select() for s in in_ready: - buf = s.read() + buf = s.read().decode() if not buf: s.close() s_in.remove(s)