From 98120f5fe2199de29c0cce8e92c692b23adf0cf7 Mon Sep 17 00:00:00 2001 From: "Carsey, Jaben" Date: Fri, 6 Apr 2018 07:14:02 +0800 Subject: BaseTools: refactor and remove out of date use of .keys() this is no longer required to make dictionary objects iterable. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/TargetTool/TargetTool.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'BaseTools/Source/Python/TargetTool/TargetTool.py') diff --git a/BaseTools/Source/Python/TargetTool/TargetTool.py b/BaseTools/Source/Python/TargetTool/TargetTool.py index ede9713c9b..143b53ec35 100644 --- a/BaseTools/Source/Python/TargetTool/TargetTool.py +++ b/BaseTools/Source/Python/TargetTool/TargetTool.py @@ -80,9 +80,8 @@ class TargetTool(): traceback.print_exception(last_type, last_value, last_tb) def Print(self): - KeyList = self.TargetTxtDictionary.keys() errMsg = '' - for Key in KeyList: + for Key in self.TargetTxtDictionary: if type(self.TargetTxtDictionary[Key]) == type([]): print "%-30s = %s" % (Key, ''.join(elem + ' ' for elem in self.TargetTxtDictionary[Key])) elif self.TargetTxtDictionary[Key] is None: -- cgit v1.2.3