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

@ -1918,7 +1918,7 @@ class DefaultStore():
if not self.DefaultStores or "0" in self.DefaultStores:
return "0",TAB_DEFAULT_STORES_DEFAULT
else:
minvalue = min([int(value_str) for value_str in self.DefaultStores.keys()])
minvalue = min([int(value_str) for value_str in self.DefaultStores])
return (str(minvalue), self.DefaultStores[str(minvalue)])
def GetMin(self,DefaultSIdList):
if not DefaultSIdList: