summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/UPT/Parser/InfSectionParser.py
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/UPT/Parser/InfSectionParser.py')
-rw-r--r--BaseTools/Source/Python/UPT/Parser/InfSectionParser.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/UPT/Parser/InfSectionParser.py b/BaseTools/Source/Python/UPT/Parser/InfSectionParser.py
index 1f254058d1..44243b467b 100644
--- a/BaseTools/Source/Python/UPT/Parser/InfSectionParser.py
+++ b/BaseTools/Source/Python/UPT/Parser/InfSectionParser.py
@@ -206,7 +206,7 @@ class InfSectionParser(InfDefinSectionParser,
if FilePath in cls.MetaFiles:
return cls.MetaFiles[FilePath]
else:
- ParserObject = super(InfSectionParser, cls).__new__(cls)
+ ParserObject = super().__new__(cls)
cls.MetaFiles[FilePath] = ParserObject
return ParserObject
@@ -227,7 +227,7 @@ class InfSectionParser(InfDefinSectionParser,
self.InfBuildOptionSection = InfBuildOptionsObject()
self.InfLibraryClassSection = InfLibraryClassObject()
self.InfPackageSection = InfPackageObject()
- self.InfPcdSection = InfPcdObject(self.MetaFiles.keys()[0])
+ self.InfPcdSection = InfPcdObject(list(self.MetaFiles.keys())[0])
self.InfSourcesSection = InfSourcesObject()
self.InfUserExtensionSection = InfUserExtensionObject()
self.InfProtocolSection = InfProtocolObject()
@@ -455,7 +455,7 @@ class InfSectionParser(InfDefinSectionParser,
Arch = Match.groups(1)[0].upper()
ArchList.append(Arch)
CommentSoFar = ''
- for Index in xrange(1, len(List)):
+ for Index in range(1, len(List)):
Result = ParseComment(List[Index], DT.ALL_USAGE_TOKENS, TokenDict, [], False)
Usage = Result[0]
Type = Result[1]