]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Common/Expression.py
BaseTools: refactor and remove un-needed use of .keys() on dictionaries
[mirror_edk2.git] / BaseTools / Source / Python / Common / Expression.py
index 462e8f93f883e3d765ccf4fefac02ff1e849bd6b..9a3415ccaabe03bd29749f33a2895f88a91729a8 100644 (file)
@@ -151,7 +151,7 @@ def ReplaceExprMacro(String, Macros, ExceptionList = None):
             InQuote = True\r
         MacroStartPos = String.find('$(')\r
         if MacroStartPos < 0:\r
-            for Pcd in gPlatformPcds.keys():\r
+            for Pcd in gPlatformPcds:\r
                 if Pcd in String:\r
                     if Pcd not in gConditionalPcds:\r
                         gConditionalPcds.append(Pcd)\r
@@ -908,7 +908,7 @@ class ValueExpressionEx(ValueExpression):
                                 for Label in LabelList:\r
                                     if not IsValidCName(Label):\r
                                         raise BadExpression('%s is not a valid c variable name' % Label)\r
-                                    if Label not in LabelDict.keys():\r
+                                    if Label not in LabelDict:\r
                                         LabelDict[Label] = str(LabelOffset)\r
                             if Item.startswith('UINT8'):\r
                                 LabelOffset = LabelOffset + 1\r