From f64fbdde8c99bcf0c97f1348f02fdcd8685f1df2 Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Mon, 13 Aug 2018 09:11:37 +0800 Subject: [PATCH] BaseTools: Clean up not used code in BuildClassObject 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 Reviewed-by: Jaben Carsey --- .../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 3b47715cbc..88465c59ea 100644 --- a/BaseTools/Source/Python/Workspace/BuildClassObject.py +++ b/BaseTools/Source/Python/Workspace/BuildClassObject.py @@ -11,11 +11,6 @@ # 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 @@ -253,18 +248,14 @@ class StructurePcd(PcdClassObject): # @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 # @@ -332,7 +323,7 @@ class ModuleBuildClassObject(object): self.Binaries = [] self.Sources = [] - self.LibraryClasses = OrderedDict() + self.LibraryClasses = collections.OrderedDict() self.Libraries = [] self.Protocols = [] self.Ppis = []