diff options
author | Marty E. Plummer <hanetzer@startmail.com> | 2019-05-10 01:38:11 -0500 |
---|---|---|
committer | RAJA DAS <rajadas2@in.ibm.com> | 2020-01-09 23:09:28 -0600 |
commit | e7dccb090786794b44213d3add032e484777726d (patch) | |
tree | 93064f4927b8071f0ab292a908bee08b4f0c2f73 /src/build/parsAndCutElf.py | |
parent | 04a2b51f4c21e763ed9f0714b61360bdd69370a5 (diff) | |
download | talos-sbe-e7dccb090786794b44213d3add032e484777726d.tar.gz talos-sbe-e7dccb090786794b44213d3add032e484777726d.zip |
securityRegListGen: use io.open and read in text mode.
io.open is compatible with python3.x's open builtin. Open in text mode
(no 'b') as this is a plain csv file, and specify the encoding as utf8.
Without this change, building with python3.x (python3.5 tested) as
/usr/bin/python will result in the following error:
File "sbe/src/build/security/securityRegListGen.py", line 695, in <module>
main(sys.argv)
File "sbe/src/build/security/securityRegListGen.py", line 592, in main
for idx, row in enumerate(reader):
File "/usr/lib/python3.5/csv.py", line 109, in __next__
self.fieldnames
File "/usr/lib/python3.5/csv.py", line 96, in fieldnames
self._fieldnames = next(self.reader)
_csv.Error: iterator should return strings, not bytes
(did you open the file in text mode?)
Change-Id: Ib86ea774b40c89e83ab1c0474014222f2fe9ddb9
Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/89386
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>
Diffstat (limited to 'src/build/parsAndCutElf.py')
0 files changed, 0 insertions, 0 deletions