summaryrefslogtreecommitdiffstats
path: root/src/boot/loader_l1.S
diff options
context:
space:
mode:
authorMarty E. Plummer <hanetzer@startmail.com>2019-05-10 03:42:13 -0500
committerRAJA DAS <rajadas2@in.ibm.com>2020-01-09 23:07:04 -0600
commit1ccc5efffc9ca96f24acb98887cdd4759d9e541f (patch)
tree906bc6cae88e09dae641f2270c64847765cc026a /src/boot/loader_l1.S
parent629327db0795743615e1baeb5d6f007dec1cd99e (diff)
downloadtalos-sbe-1ccc5efffc9ca96f24acb98887cdd4759d9e541f.tar.gz
talos-sbe-1ccc5efffc9ca96f24acb98887cdd4759d9e541f.zip
sbeCompression: add a python3 compatible fallback
In python3.x dict.items() does (more or less) what dict.iteritems() did in python2.x, but dict.iteritems() was removed in python3.x entirely. Further, dict.items() in python2.7 is less efficient than dict.iteritems(), so we attempt to use dict.iteritems(), and if that throws an AttributeError, (which would happen on python3.x), fall back to dict.items(). 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 "sbe/src/boot/sbeCompress ion.py", line 198, in <module> main( sys.argv ) File "sbe/src/boot/sbeCompression.py", line 181, in main compress(imagePath + "/" + image + ".base", imagePath + "/" + image + ".base.compressed") File "sbe/src/boot/sbeCompression.py", line 72, in compress sortedList = sorted(instDict.iteritems(), key=operator.itemgetter(1), reverse = True) AttributeError: 'dict' object has no attribute 'iteritems' Change-Id: Iea3109cb51266161629d6e09e79af63af0bbd08c Signed-off-by: Marty E. Plummer <hanetzer@startmail.com> Signed-off-by: vinaybs6 <vinaybs6@in.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/89370 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/boot/loader_l1.S')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud