aboutsummaryrefslogtreecommitdiffstats
path: root/utils.py
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2016-09-19 17:19:59 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2016-09-20 12:30:52 +0000
commit7a5b8f77391689f50d03a9f94c9d2f0570d340fb (patch)
treec8003b2c97104edcab1dc54f572feceaed34b3e4 /utils.py
parent450ff3b4ebae80de192f24afb5cd1993faf226b4 (diff)
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 <Friedemann.Kleint@qt.io>
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py2
1 files changed, 1 insertions, 1 deletions
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