diff options
author | Carsey, Jaben <jaben.carsey@intel.com> | 2018-04-28 06:32:52 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-05-04 13:07:55 +0800 |
commit | c5c7e68a915954d8fd15f6c8f3523c65ee06f489 (patch) | |
tree | bcb237ed05d9928f2882893d2cd2fc195aaaf3b9 /BaseTools/Source/Python/AutoGen/GenDepex.py | |
parent | 0ed0372a6b536a27a72365311897f3a273258b59 (diff) | |
download | edk2-c5c7e68a915954d8fd15f6c8f3523c65ee06f489.tar.gz edk2-c5c7e68a915954d8fd15f6c8f3523c65ee06f489.tar.bz2 edk2-c5c7e68a915954d8fd15f6c8f3523c65ee06f489.zip |
BaseTools: Remove lists form set construction
There is no need to make a list to make a set. remove lists
that are only used in constructing sets.
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/AutoGen/GenDepex.py')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/GenDepex.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/BaseTools/Source/Python/AutoGen/GenDepex.py b/BaseTools/Source/Python/AutoGen/GenDepex.py index 7126fdcddf..23b289500e 100644 --- a/BaseTools/Source/Python/AutoGen/GenDepex.py +++ b/BaseTools/Source/Python/AutoGen/GenDepex.py @@ -54,7 +54,7 @@ gType2Phase = { #
class DependencyExpression:
- ArchProtocols = set([
+ ArchProtocols = {
'665e3ff6-46cc-11d4-9a38-0090273fc14d', # 'gEfiBdsArchProtocolGuid'
'26baccb1-6f42-11d4-bce7-0080c73c8881', # 'gEfiCpuArchProtocolGuid'
'26baccb2-6f42-11d4-bce7-0080c73c8881', # 'gEfiMetronomeArchProtocolGuid'
@@ -67,8 +67,7 @@ class DependencyExpression: '6441f818-6362-4e44-b570-7dba31dd2453', # 'gEfiVariableWriteArchProtocolGuid'
'1e5668e2-8481-11d4-bcf1-0080c73c8881', # 'gEfiVariableArchProtocolGuid'
'665e3ff5-46cc-11d4-9a38-0090273fc14d' # 'gEfiWatchdogTimerArchProtocolGuid'
- ]
- )
+ }
OpcodePriority = {
DEPEX_OPCODE_AND : 1,
@@ -304,7 +303,7 @@ class DependencyExpression: # don't generate depex if all operands are architecture protocols
if self.ModuleType in [SUP_MODULE_UEFI_DRIVER, SUP_MODULE_DXE_DRIVER, SUP_MODULE_DXE_RUNTIME_DRIVER, SUP_MODULE_DXE_SAL_DRIVER, SUP_MODULE_DXE_SMM_DRIVER, SUP_MODULE_MM_STANDALONE] and \
Op == DEPEX_OPCODE_AND and \
- self.ArchProtocols == set([GuidStructureStringToGuidString(Guid) for Guid in AllOperand]):
+ self.ArchProtocols == set(GuidStructureStringToGuidString(Guid) for Guid in AllOperand):
self.PostfixNotation = []
return
|