BaseTools: refactor and remove un-needed use of .keys() on dictionaries

sometimes just delete it.
sometimes the loop needed .values() instead

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
Carsey, Jaben
2018-04-17 22:40:15 +08:00
committed by Yonghong Zhu
parent 55c84777ee
commit 9eb87141ec
27 changed files with 137 additions and 159 deletions

View File

@ -114,8 +114,8 @@ class VariableMgr(object):
self.VarInfo = [item[0] for item in indexedvarinfo.values()]
def assemble_variable(self, valuelist):
ordered_value = [valuelist[k] for k in sorted(valuelist.keys())]
ordered_offset = sorted(valuelist.keys())
ordered_value = [valuelist[k] for k in ordered_offset]
var_value = []
num = 0
for offset in ordered_offset: