From nobody Thu Apr 25 00:28:24 2024 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 1534122773498911.4351693379629; Sun, 12 Aug 2018 18:12:53 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 57A0C210ED780; Sun, 12 Aug 2018 18:12:52 -0700 (PDT) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 BD3B821BADAB2 for ; Sun, 12 Aug 2018 18:12:51 -0700 (PDT) Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Aug 2018 18:12:51 -0700 Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by fmsmga007.fm.intel.com with ESMTP; 12 Aug 2018 18:12:50 -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=192.55.52.151; helo=mga17.intel.com; envelope-from=yonghong.zhu@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.53,231,1531810800"; d="scan'208";a="61896796" From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Mon, 13 Aug 2018 09:12:29 +0800 Message-Id: <1534122749-6608-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [edk2] [Patch] BaseTools: Clean up not used code in BuildClassObject X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jaben Carsey , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RDMRC_1 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 1. Remove some import statement that are not used. 2. Remove the Type value in the LibraryClassObject because we don't actually use it. Cc: Liming Gao Cc: Jaben Carsey Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/Workspace/BuildClassObject.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/BuildClassObject.py b/BaseTo= ols/Source/Python/Workspace/BuildClassObject.py index 3b47715..28b6190 100644 --- a/BaseTools/Source/Python/Workspace/BuildClassObject.py +++ b/BaseTools/Source/Python/Workspace/BuildClassObject.py @@ -9,16 +9,10 @@ # # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. # =20 -import Common.LongFilePathOs as os - -from collections import OrderedDict -from Common.Misc import RealPath2 -from Common.BuildToolError import * -from Common.DataType import * import collections =20 ## PcdClassObject # # This Class is used for PcdObject @@ -251,22 +245,18 @@ class StructurePcd(PcdClassObject): # This Class defines LibraryClassObject used in BuildDatabase # # @param object: Inherited from object class # @param Name: Input value for LibraryClassName, default is None # @param SupModList: Input value for SupModList, default is [] -# @param Type: Input value for Type, default is None # # @var LibraryClass: To store value for LibraryClass # @var SupModList: To store value for SupModList -# @var Type: To store value for Type # class LibraryClassObject(object): - def __init__(self, Name =3D None, SupModList =3D [], Type =3D None): + def __init__(self, Name =3D None, SupModList =3D []): self.LibraryClass =3D Name self.SupModList =3D SupModList - if Type is not None: - self.SupModList =3D CleanString(Type).split(DataType.TAB_SPACE= _SPLIT) =20 ## ModuleBuildClassObject # # This Class defines ModuleBuildClass # @@ -330,11 +320,11 @@ class ModuleBuildClassObject(object): self.ConstructorList =3D [] self.DestructorList =3D [] =20 self.Binaries =3D [] self.Sources =3D [] - self.LibraryClasses =3D OrderedDict() + self.LibraryClasses =3D collections.OrderedDict() self.Libraries =3D [] self.Protocols =3D [] self.Ppis =3D [] self.Guids =3D [] self.Includes =3D [] --=20 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel