From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org 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 1EF90210EE4EF for ; Mon, 13 Aug 2018 01:11:52 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Aug 2018 01:11:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,232,1531810800"; d="scan'208";a="80839421" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by fmsmga001.fm.intel.com with ESMTP; 13 Aug 2018 01:11:51 -0700 From: Yonghong Zhu To: edk2-devel@lists.01.org Cc: Liming Gao , Jaben Carsey Date: Mon, 13 Aug 2018 16:11:48 +0800 Message-Id: <1534147908-12300-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [Patch V2] 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: , X-List-Received-Date: Mon, 13 Aug 2018 08:11:53 -0000 V2: Add back "from Common.DataType import *" 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 | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/BuildClassObject.py b/BaseTools/Source/Python/Workspace/BuildClassObject.py index 3b47715..88465c5 100644 --- a/BaseTools/Source/Python/Workspace/BuildClassObject.py +++ b/BaseTools/Source/Python/Workspace/BuildClassObject.py @@ -9,15 +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 IMPLIED. # -import Common.LongFilePathOs as os - -from collections import OrderedDict -from Common.Misc import RealPath2 -from Common.BuildToolError import * from Common.DataType import * import collections ## PcdClassObject # @@ -251,22 +246,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 = None, SupModList = [], Type = None): + def __init__(self, Name = None, SupModList = []): self.LibraryClass = Name self.SupModList = SupModList - if Type is not None: - self.SupModList = CleanString(Type).split(DataType.TAB_SPACE_SPLIT) ## ModuleBuildClassObject # # This Class defines ModuleBuildClass # @@ -330,11 +321,11 @@ class ModuleBuildClassObject(object): self.ConstructorList = [] self.DestructorList = [] self.Binaries = [] self.Sources = [] - self.LibraryClasses = OrderedDict() + self.LibraryClasses = collections.OrderedDict() self.Libraries = [] self.Protocols = [] self.Ppis = [] self.Guids = [] self.Includes = [] -- 2.6.1.windows.1