]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/UPT/Parser/InfSectionParser.py
BaseTools/UPT:merge UPT Tool use Python2 and Python3
[mirror_edk2.git] / BaseTools / Source / Python / UPT / Parser / InfSectionParser.py
index 1f254058d1332685891585017ae8289dc030bd3f..d9c9d41fcb3a88721cd77e71fa4458b74c1d38bf 100644 (file)
@@ -227,7 +227,7 @@ class InfSectionParser(InfDefinSectionParser,
         self.InfBuildOptionSection = InfBuildOptionsObject()\r
         self.InfLibraryClassSection = InfLibraryClassObject()\r
         self.InfPackageSection = InfPackageObject()\r
-        self.InfPcdSection = InfPcdObject(self.MetaFiles.keys()[0])\r
+        self.InfPcdSection = InfPcdObject(list(self.MetaFiles.keys())[0])\r
         self.InfSourcesSection = InfSourcesObject()\r
         self.InfUserExtensionSection = InfUserExtensionObject()\r
         self.InfProtocolSection = InfProtocolObject()\r
@@ -455,7 +455,7 @@ class InfSectionParser(InfDefinSectionParser,
                     Arch = Match.groups(1)[0].upper()\r
                     ArchList.append(Arch)\r
             CommentSoFar = ''\r
-            for Index in xrange(1, len(List)):\r
+            for Index in range(1, len(List)):\r
                 Result = ParseComment(List[Index], DT.ALL_USAGE_TOKENS, TokenDict, [], False)\r
                 Usage = Result[0]\r
                 Type = Result[1]\r