From nobody Tue Feb 10 12:59:30 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1529528929523931.2088721207394; Wed, 20 Jun 2018 14:08:49 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id C1CD4211BED58; Wed, 20 Jun 2018 14:08:31 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 002DC211BD61B for ; Wed, 20 Jun 2018 14:08:29 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jun 2018 14:08:29 -0700 Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.144]) by orsmga004.jf.intel.com with ESMTP; 20 Jun 2018 14:08:29 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,249,1526367600"; d="scan'208";a="209784380" From: Jaben Carsey To: edk2-devel@lists.01.org Date: Wed, 20 Jun 2018 14:08:11 -0700 Message-Id: <9fe62218b6620a83a8504f6448ef5ed4194caeac.1529528784.git.jaben.carsey@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: References: In-Reply-To: References: Subject: [edk2] [PATCH v1 05/11] BaseTools: use set presence instead of series of equality 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: , Cc: Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Instead of testing each equality individually, just make a set and test onc= e. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Ecc/Configuration.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/BaseTools/Source/Python/Ecc/Configuration.py b/BaseTools/Sourc= e/Python/Ecc/Configuration.py index 217b60f4f319..8f4426c20421 100644 --- a/BaseTools/Source/Python/Ecc/Configuration.py +++ b/BaseTools/Source/Python/Ecc/Configuration.py @@ -404,17 +404,9 @@ class Configuration(object): ErrorMsg =3D "Invalid configuration option '%s' was fo= und" % List[0] EdkLogger.error("Ecc", EdkLogger.ECC_ERROR, ErrorMsg, = File =3D Filepath, Line =3D LineNo) assert _ConfigFileToInternalTranslation[List[0]] in self._= _dict__ - if List[0] =3D=3D 'ModifierList': - List[1] =3D GetSplitValueList(List[1], TAB_COMMA_SPLIT) if List[0] =3D=3D 'MetaDataFileCheckPathOfGenerateFileList= ' and List[1] =3D=3D "": continue - if List[0] =3D=3D 'SkipDirList': - List[1] =3D GetSplitValueList(List[1], TAB_COMMA_SPLIT) - if List[0] =3D=3D 'SkipFileList': - List[1] =3D GetSplitValueList(List[1], TAB_COMMA_SPLIT) - if List[0] =3D=3D 'BinaryExtList': - List[1] =3D GetSplitValueList(List[1], TAB_COMMA_SPLIT) - if List[0] =3D=3D 'Copyright': + if List[0] in {'ModifierList','SkipDirList','SkipFileList'= ,'BinaryExtList','Copyright'}: List[1] =3D GetSplitValueList(List[1], TAB_COMMA_SPLIT) self.__dict__[_ConfigFileToInternalTranslation[List[0]]] = =3D List[1] =20 --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel