summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/UPT/Object/Parser
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/UPT/Object/Parser')
-rw-r--r--BaseTools/Source/Python/UPT/Object/Parser/InfBinaryObject.py6
-rw-r--r--BaseTools/Source/Python/UPT/Object/Parser/InfDefineObject.py2
-rw-r--r--BaseTools/Source/Python/UPT/Object/Parser/InfGuidObject.py4
-rw-r--r--BaseTools/Source/Python/UPT/Object/Parser/InfLibraryClassesObject.py2
-rw-r--r--BaseTools/Source/Python/UPT/Object/Parser/InfMisc.py4
-rw-r--r--BaseTools/Source/Python/UPT/Object/Parser/InfPackagesObject.py4
-rw-r--r--BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py4
-rw-r--r--BaseTools/Source/Python/UPT/Object/Parser/InfPpiObject.py4
-rw-r--r--BaseTools/Source/Python/UPT/Object/Parser/InfProtocolObject.py2
-rw-r--r--BaseTools/Source/Python/UPT/Object/Parser/InfSoucesObject.py3
-rw-r--r--BaseTools/Source/Python/UPT/Object/Parser/InfUserExtensionObject.py4
11 files changed, 19 insertions, 20 deletions
diff --git a/BaseTools/Source/Python/UPT/Object/Parser/InfBinaryObject.py b/BaseTools/Source/Python/UPT/Object/Parser/InfBinaryObject.py
index 33b142d64e..cc2fc49053 100644
--- a/BaseTools/Source/Python/UPT/Object/Parser/InfBinaryObject.py
+++ b/BaseTools/Source/Python/UPT/Object/Parser/InfBinaryObject.py
@@ -272,7 +272,7 @@ class InfBinariesObject(InfSectionCommonDef):
pass
if InfBianryVerItemObj is not None:
- if self.Binaries.has_key((InfBianryVerItemObj)):
+ if (InfBianryVerItemObj) in self.Binaries:
BinariesList = self.Binaries[InfBianryVerItemObj]
BinariesList.append((InfBianryVerItemObj, VerComment))
self.Binaries[InfBianryVerItemObj] = BinariesList
@@ -522,7 +522,7 @@ class InfBinariesObject(InfSectionCommonDef):
# pass
if InfBianryCommonItemObj is not None:
- if self.Binaries.has_key((InfBianryCommonItemObj)):
+ if (InfBianryCommonItemObj) in self.Binaries:
BinariesList = self.Binaries[InfBianryCommonItemObj]
BinariesList.append((InfBianryCommonItemObj, ItemComment))
self.Binaries[InfBianryCommonItemObj] = BinariesList
@@ -673,7 +673,7 @@ class InfBinariesObject(InfSectionCommonDef):
# pass
if InfBianryUiItemObj is not None:
- if self.Binaries.has_key((InfBianryUiItemObj)):
+ if (InfBianryUiItemObj) in self.Binaries:
BinariesList = self.Binaries[InfBianryUiItemObj]
BinariesList.append((InfBianryUiItemObj, UiComment))
self.Binaries[InfBianryUiItemObj] = BinariesList
diff --git a/BaseTools/Source/Python/UPT/Object/Parser/InfDefineObject.py b/BaseTools/Source/Python/UPT/Object/Parser/InfDefineObject.py
index 3995546593..9d27a92cd6 100644
--- a/BaseTools/Source/Python/UPT/Object/Parser/InfDefineObject.py
+++ b/BaseTools/Source/Python/UPT/Object/Parser/InfDefineObject.py
@@ -957,7 +957,7 @@ class InfDefObject(InfSectionCommonDef):
SpecValue = Name[Name.find("SPEC") + len("SPEC"):].strip()
Name = "SPEC"
Value = SpecValue + " = " + Value
- if self.Defines.has_key(ArchListString):
+ if ArchListString in self.Defines:
DefineList = self.Defines[ArchListString]
LineInfo[0] = InfDefMemberObj.CurrentLine.GetFileName()
LineInfo[1] = InfDefMemberObj.CurrentLine.GetLineNo()
diff --git a/BaseTools/Source/Python/UPT/Object/Parser/InfGuidObject.py b/BaseTools/Source/Python/UPT/Object/Parser/InfGuidObject.py
index fb8d1f5a62..4dfe75a2f1 100644
--- a/BaseTools/Source/Python/UPT/Object/Parser/InfGuidObject.py
+++ b/BaseTools/Source/Python/UPT/Object/Parser/InfGuidObject.py
@@ -338,7 +338,7 @@ class InfGuidObject():
#
pass
- if self.Guids.has_key((InfGuidItemObj)):
+ if (InfGuidItemObj) in self.Guids:
GuidList = self.Guids[InfGuidItemObj]
GuidList.append(InfGuidItemObj)
self.Guids[InfGuidItemObj] = GuidList
@@ -350,4 +350,4 @@ class InfGuidObject():
return True
def GetGuid(self):
- return self.Guids \ No newline at end of file
+ return self.Guids
diff --git a/BaseTools/Source/Python/UPT/Object/Parser/InfLibraryClassesObject.py b/BaseTools/Source/Python/UPT/Object/Parser/InfLibraryClassesObject.py
index e588c6ba66..5de1832b71 100644
--- a/BaseTools/Source/Python/UPT/Object/Parser/InfLibraryClassesObject.py
+++ b/BaseTools/Source/Python/UPT/Object/Parser/InfLibraryClassesObject.py
@@ -238,7 +238,7 @@ class InfLibraryClassObject():
LibItemObj.SetVersion(LibItem[1])
LibItemObj.SetSupArchList(__SupArchList)
- if self.LibraryClasses.has_key((LibItemObj)):
+ if (LibItemObj) in self.LibraryClasses:
LibraryList = self.LibraryClasses[LibItemObj]
LibraryList.append(LibItemObj)
self.LibraryClasses[LibItemObj] = LibraryList
diff --git a/BaseTools/Source/Python/UPT/Object/Parser/InfMisc.py b/BaseTools/Source/Python/UPT/Object/Parser/InfMisc.py
index 37f8cb2336..4ed739d66f 100644
--- a/BaseTools/Source/Python/UPT/Object/Parser/InfMisc.py
+++ b/BaseTools/Source/Python/UPT/Object/Parser/InfMisc.py
@@ -114,7 +114,7 @@ class InfSpecialCommentObject(InfSectionCommonDef):
Type == DT.TYPE_EVENT_SECTION or \
Type == DT.TYPE_BOOTMODE_SECTION:
for Item in SepcialSectionList:
- if self.SpecialComments.has_key(Type):
+ if Type in self.SpecialComments:
ObjList = self.SpecialComments[Type]
ObjList.append(Item)
self.SpecialComments[Type] = ObjList
@@ -145,4 +145,4 @@ def ErrorInInf(Message=None, ErrorCode=None, LineInfo=None, RaiseError=True):
File=LineInfo[0],
Line=LineInfo[1],
ExtraData=LineInfo[2],
- RaiseError=RaiseError) \ No newline at end of file
+ RaiseError=RaiseError)
diff --git a/BaseTools/Source/Python/UPT/Object/Parser/InfPackagesObject.py b/BaseTools/Source/Python/UPT/Object/Parser/InfPackagesObject.py
index 01c854a847..bfac2b6b57 100644
--- a/BaseTools/Source/Python/UPT/Object/Parser/InfPackagesObject.py
+++ b/BaseTools/Source/Python/UPT/Object/Parser/InfPackagesObject.py
@@ -171,7 +171,7 @@ class InfPackageObject():
#
pass
- if self.Packages.has_key((PackageItemObj)):
+ if (PackageItemObj) in self.Packages:
PackageList = self.Packages[PackageItemObj]
PackageList.append(PackageItemObj)
self.Packages[PackageItemObj] = PackageList
@@ -184,4 +184,4 @@ class InfPackageObject():
def GetPackages(self, Arch = None):
if Arch is None:
- return self.Packages \ No newline at end of file
+ return self.Packages
diff --git a/BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py b/BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py
index 62c1e8409a..3b9dfaed0c 100644
--- a/BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py
+++ b/BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py
@@ -411,7 +411,7 @@ class InfPcdObject():
else:
PcdItemObj.SetSupportArchList(SupArchList)
- if self.Pcds.has_key((PcdTypeItem, PcdItemObj)):
+ if (PcdTypeItem, PcdItemObj) in self.Pcds:
PcdsList = self.Pcds[PcdTypeItem, PcdItemObj]
PcdsList.append(PcdItemObj)
self.Pcds[PcdTypeItem, PcdItemObj] = PcdsList
@@ -456,7 +456,7 @@ class InfPcdObject():
PackageInfo)
PcdTypeItem = KeysList[0][0]
- if self.Pcds.has_key((PcdTypeItem, PcdItemObj)):
+ if (PcdTypeItem, PcdItemObj) in self.Pcds:
PcdsList = self.Pcds[PcdTypeItem, PcdItemObj]
PcdsList.append(PcdItemObj)
self.Pcds[PcdTypeItem, PcdItemObj] = PcdsList
diff --git a/BaseTools/Source/Python/UPT/Object/Parser/InfPpiObject.py b/BaseTools/Source/Python/UPT/Object/Parser/InfPpiObject.py
index eb6b692714..0f865c5696 100644
--- a/BaseTools/Source/Python/UPT/Object/Parser/InfPpiObject.py
+++ b/BaseTools/Source/Python/UPT/Object/Parser/InfPpiObject.py
@@ -327,7 +327,7 @@ class InfPpiObject():
#
pass
- if self.Ppis.has_key((InfPpiItemObj)):
+ if (InfPpiItemObj) in self.Ppis:
PpiList = self.Ppis[InfPpiItemObj]
PpiList.append(InfPpiItemObj)
self.Ppis[InfPpiItemObj] = PpiList
@@ -340,4 +340,4 @@ class InfPpiObject():
def GetPpi(self):
- return self.Ppis \ No newline at end of file
+ return self.Ppis
diff --git a/BaseTools/Source/Python/UPT/Object/Parser/InfProtocolObject.py b/BaseTools/Source/Python/UPT/Object/Parser/InfProtocolObject.py
index eb03095d6f..6cadeb5a21 100644
--- a/BaseTools/Source/Python/UPT/Object/Parser/InfProtocolObject.py
+++ b/BaseTools/Source/Python/UPT/Object/Parser/InfProtocolObject.py
@@ -296,7 +296,7 @@ class InfProtocolObject():
#
pass
- if self.Protocols.has_key((InfProtocolItemObj)):
+ if (InfProtocolItemObj) in self.Protocols:
ProcotolList = self.Protocols[InfProtocolItemObj]
ProcotolList.append(InfProtocolItemObj)
self.Protocols[InfProtocolItemObj] = ProcotolList
diff --git a/BaseTools/Source/Python/UPT/Object/Parser/InfSoucesObject.py b/BaseTools/Source/Python/UPT/Object/Parser/InfSoucesObject.py
index 2302dd5b96..285e89aacb 100644
--- a/BaseTools/Source/Python/UPT/Object/Parser/InfSoucesObject.py
+++ b/BaseTools/Source/Python/UPT/Object/Parser/InfSoucesObject.py
@@ -224,7 +224,7 @@ class InfSourcesObject(InfSectionCommonDef):
ItemObj.SetSupArchList(__SupArchList)
- if self.Sources.has_key((ItemObj)):
+ if (ItemObj) in self.Sources:
SourceContent = self.Sources[ItemObj]
SourceContent.append(ItemObj)
self.Sources[ItemObj] = SourceContent
@@ -237,4 +237,3 @@ class InfSourcesObject(InfSectionCommonDef):
def GetSources(self):
return self.Sources
- \ No newline at end of file
diff --git a/BaseTools/Source/Python/UPT/Object/Parser/InfUserExtensionObject.py b/BaseTools/Source/Python/UPT/Object/Parser/InfUserExtensionObject.py
index 27a1c6ad25..f9db2944a4 100644
--- a/BaseTools/Source/Python/UPT/Object/Parser/InfUserExtensionObject.py
+++ b/BaseTools/Source/Python/UPT/Object/Parser/InfUserExtensionObject.py
@@ -103,7 +103,7 @@ class InfUserExtensionObject():
# Line=LineNo,
# ExtraData=None)
- if self.UserExtension.has_key(IdContentItem):
+ if IdContentItem in self.UserExtension:
#
# Each UserExtensions section header must have a unique set
# of UserId, IdString and Arch values.
@@ -130,4 +130,4 @@ class InfUserExtensionObject():
return True
def GetUserExtension(self):
- return self.UserExtension \ No newline at end of file
+ return self.UserExtension