summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Workspace
diff options
context:
space:
mode:
authorCarsey, Jaben <jaben.carsey@intel.com>2018-04-20 23:51:37 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-05-02 14:59:20 +0800
commiteece4292acc8068a3383fc200ac8c66be1156763 (patch)
tree8a2ab32e06f91cb43489246d44938449fcf7861a /BaseTools/Source/Python/Workspace
parent0c60e60b1800cfd80d9aa8e93b482f812d2414a1 (diff)
downloadedk2-eece4292acc8068a3383fc200ac8c66be1156763.tar.gz
edk2-eece4292acc8068a3383fc200ac8c66be1156763.tar.bz2
edk2-eece4292acc8068a3383fc200ac8c66be1156763.zip
BaseTools: DataType - cleanup list constants
remove unused ones convert lists used for membership testing to sets use shared ones not local ones Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace')
-rw-r--r--BaseTools/Source/Python/Workspace/InfBuildData.py2
-rw-r--r--BaseTools/Source/Python/Workspace/MetaFileParser.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/BaseTools/Source/Python/Workspace/InfBuildData.py
index 27ef163eb4..94f142e8e6 100644
--- a/BaseTools/Source/Python/Workspace/InfBuildData.py
+++ b/BaseTools/Source/Python/Workspace/InfBuildData.py
@@ -901,7 +901,7 @@ class InfBuildData(ModuleBuildClassObject):
Depex[Arch, ModuleType] = []
DepexList = Depex[Arch, ModuleType]
for Token in TokenList:
- if Token in DEPEX_SUPPORTED_OPCODE:
+ if Token in DEPEX_SUPPORTED_OPCODE_SET:
DepexList.append(Token)
elif Token.endswith(".inf"): # module file name
ModuleFile = os.path.normpath(Token)
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py
index 64394026cb..36843643ed 100644
--- a/BaseTools/Source/Python/Workspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py
@@ -310,7 +310,7 @@ class MetaFileParser(object):
if self._SectionName in self.DataType:
self._SectionType = self.DataType[self._SectionName]
# Check if the section name is valid
- if self._SectionName not in SECTIONS_HAVE_ITEM_AFTER_ARCH and len(ItemList) > 3:
+ if self._SectionName not in SECTIONS_HAVE_ITEM_AFTER_ARCH_SET and len(ItemList) > 3:
EdkLogger.error("Parser", FORMAT_UNKNOWN_ERROR, "%s is not a valid section name" % Item,
self.MetaFile, self._LineIndex + 1, self._CurrentLine)
elif self._Version >= 0x00010005:
@@ -328,7 +328,7 @@ class MetaFileParser(object):
# S2 may be Platform or ModuleType
if len(ItemList) > 2:
- if self._SectionName.upper() in SECTIONS_HAVE_ITEM_PCD:
+ if self._SectionName.upper() in SECTIONS_HAVE_ITEM_PCD_SET:
S2 = ItemList[2]
else:
S2 = ItemList[2].upper()