Skip to content

Commit

Permalink
parsAndCutElf: convert line to str
Browse files Browse the repository at this point in the history
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'

Change-Id: I0220d0457371349d0a77ac042484fd03f8a984da
Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/89385
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Srikantha S. Meesala <srikantha@in.ibm.com>
Reviewed-by: RAJA DAS <rajadas2@in.ibm.com>
  • Loading branch information
hanetzer authored and RAJA DAS committed Jan 10, 2020
1 parent e7dccb0 commit 2615d39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/build/parsAndCutElf.py
Expand Up @@ -6,7 +6,7 @@
#
# OpenPOWER sbe Project
#
# Contributors Listed Below - COPYRIGHT 2016,2019
# Contributors Listed Below - COPYRIGHT 2016,2020
# [+] International Business Machines Corp.
#
#
Expand Down Expand Up @@ -46,7 +46,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

Expand Down

0 comments on commit 2615d39

Please sign in to comment.