[OpenPower-Firmware] [RFC PATCH 3/6] parsAndCutElf: convert line to str
Marty E. Plummer
hanetzer at startmail.com
Fri May 10 19:35:06 AEST 2019
Without this change, building with python3.x (python3.5 tested) as
/usr/bin/python will result in the following error:
Traceback (most recent call last):
File "./parsAndCutElf.py", line 79, in <module>
parserElf(sys.argv)
File "./parsAndCutElf.py", line 54, in parserElf
if( (line.find(firstSection) != -1) ):
TypeError: a bytes-like object is required, not 'str'
Signed-off-by: Marty E. Plummer <hanetzer at startmail.com>
---
src/build/parsAndCutElf.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/build/parsAndCutElf.py b/src/build/parsAndCutElf.py
index 57bf8af9..c3a65fbd 100755
--- a/src/build/parsAndCutElf.py
+++ b/src/build/parsAndCutElf.py
@@ -47,7 +47,7 @@ def parserElf(argv):
output = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
i = 0;
for line in output.stdout:
- line = line.strip()
+ line = str(line.strip())
if not line: continue
--
2.21.0
More information about the OpenPower-Firmware
mailing list