From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E290621E08167 for ; Fri, 30 Mar 2018 15:18:40 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Mar 2018 15:18:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,383,1517904000"; d="scan'208";a="46725143" Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.144]) by orsmga002.jf.intel.com with ESMTP; 30 Mar 2018 15:18:40 -0700 From: Jaben Carsey To: edk2-devel@lists.01.org Cc: Liming Gao , Yonghong Zhu Date: Fri, 30 Mar 2018 15:18:36 -0700 Message-Id: <20180330221836.21772-1-jaben.carsey@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 Subject: [PATCH v2 1/1] BaseTools: use list comprehension instead of temp variable X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2018 22:18:41 -0000 fixed Arch->x Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- 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