summaryrefslogtreecommitdiffstats
path: root/rtemstoolkit/execute.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2016-03-09 14:39:43 +1100
committerChris Johns <chrisj@rtems.org>2016-03-09 14:39:43 +1100
commit6359063eb95f2495fb4b4ff879a02864cafc9fe9 (patch)
treeae831a1463f74d70c0b6d86d5b25e32db26a03ed /rtemstoolkit/execute.py
parentUpdate rtems-tool to support Python 2 and 3. (diff)
downloadrtems-tools-6359063eb95f2495fb4b4ff879a02864cafc9fe9.tar.bz2
Python 2 and python 3 refactor fixes.
Updates #2619.
Diffstat (limited to 'rtemstoolkit/execute.py')
-rwxr-xr-xrtemstoolkit/execute.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/rtemstoolkit/execute.py b/rtemstoolkit/execute.py
index 147d501..0dc9d4c 100755
--- a/rtemstoolkit/execute.py
+++ b/rtemstoolkit/execute.py
@@ -185,7 +185,8 @@ class execute(object):
data = fh.read(1)
if len(data) == 0:
break
- if type(data) == bytes:
+ # str and bytes are the same type in Python2
+ if type(data) is not str and type(data) is bytes:
data = data.decode(sys.stdout.encoding)
for c in data:
line += c