From 7a5b8f77391689f50d03a9f94c9d2f0570d340fb Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 19 Sep 2016 17:19:59 +0200 Subject: Fix run_process_output to work with Python 3 Strings are already encoded as utf8, so there is no need to call decode on them. Change-Id: Idfaaa5f5092fb6010ea64b7abf754d7b343d07e5 Reviewed-by: Friedemann Kleint --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 0167b9349..f7be19d1b 100644 --- a/utils.py +++ b/utils.py @@ -332,7 +332,7 @@ def run_process_output(args, initial_env=None): stdout=subprocess.PIPE).stdout result = [] for rawLine in stdOut.readlines(): - line = rawLine.decode('utf-8') + line = rawLine if sys.version_info >= (3,) else rawLine.decode('utf-8') result.append(line.rstrip()) return result -- cgit v1.2.3