* [PATCH v2 1/1] BaseTools: use list comprehension instead of temp variable
@ 2018-03-30 22:18 Jaben Carsey
0 siblings, 0 replies; only message in thread
From: Jaben Carsey @ 2018-03-30 22:18 UTC (permalink / raw)
To: edk2-devel; +Cc: Liming Gao, Yonghong Zhu
fixed Arch->x
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>
---
BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py b/BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py
index c0966d526519..6207006bec77 100644
--- a/BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py
+++ b/BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py
@@ -478,16 +478,8 @@ class WorkspaceBuild(object):
#
# Get global information
#
- Tmp = set()
- for Arch in DataType.ARCH_LIST:
- for Item in Platform.Header[Arch].SupArchList:
- Tmp.add(Item)
- self.SupArchList = list(Tmp)
- Tmp = set()
- for Arch in DataType.ARCH_LIST:
- for Item in Platform.Header[Arch].BuildTargets:
- Tmp.add(Item)
- self.BuildTarget = list(Tmp)
+ self.SupArchList = list({y for x in DataType.ARCH_LIST for y in Platform.Header[x].SupArchList})
+ self.BuildTarget = list({y for x in DataType.ARCH_LIST for y in Platform.Header[x].BuildTargets})
for Arch in self.SupArchList:
self.SkuId = Platform.Header[Arch].SkuIdName
self.Fdf = Platform.FlashDefinitionFile.FilePath
--
2.16.2.windows.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
GitPatchExtractor 1.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-03-30 22:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-30 22:18 [PATCH v2 1/1] BaseTools: use list comprehension instead of temp variable Jaben Carsey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox