]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/UPT/Parser/InfSectionParser.py
Revert BaseTools: PYTHON3 migration
[mirror_edk2.git] / BaseTools / Source / Python / UPT / Parser / InfSectionParser.py
index 44243b467b4151160f4844472b5244027186838e..1f254058d1332685891585017ae8289dc030bd3f 100644 (file)
@@ -206,7 +206,7 @@ class InfSectionParser(InfDefinSectionParser,
         if FilePath in cls.MetaFiles:\r
             return cls.MetaFiles[FilePath]\r
         else:\r
-            ParserObject = super().__new__(cls)\r
+            ParserObject = super(InfSectionParser, cls).__new__(cls)\r
             cls.MetaFiles[FilePath] = ParserObject\r
             return ParserObject\r
 \r
@@ -227,7 +227,7 @@ class InfSectionParser(InfDefinSectionParser,
         self.InfBuildOptionSection = InfBuildOptionsObject()\r
         self.InfLibraryClassSection = InfLibraryClassObject()\r
         self.InfPackageSection = InfPackageObject()\r
-        self.InfPcdSection = InfPcdObject(list(self.MetaFiles.keys())[0])\r
+        self.InfPcdSection = InfPcdObject(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 range(1, len(List)):\r
+            for Index in xrange(1, len(List)):\r
                 Result = ParseComment(List[Index], DT.ALL_USAGE_TOKENS, TokenDict, [], False)\r
                 Usage = Result[0]\r
                 Type = Result[1]\r