From 938cf4c33a0695ef1011b07e455a7ec2f87b5ad3 Mon Sep 17 00:00:00 2001 From: "Carsey, Jaben" Date: Thu, 10 Jan 2019 03:00:41 +0800 Subject: BaseTools: fix imports 1 - Some of these imports are cascaded from another file. Import them locally. 2 - Some of these imports are not used. Remove them. 3 - Some of these were missing the namespace used to import them. These changes facilitate optimization of BaseTools: https://bugzilla.tianocore.org/show_bug.cgi?id=42 Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by: Bob Feng --- BaseTools/Source/Python/GenFds/FfsInfStatement.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'BaseTools/Source/Python/GenFds/FfsInfStatement.py') diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py b/BaseTools/Source/Python/GenFds/FfsInfStatement.py index d4c61c0749..4dda3cf787 100644 --- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py +++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py @@ -30,6 +30,7 @@ from . import RuleSimpleFile from . import RuleComplexFile from CommonDataClass.FdfClass import FfsInfStatementClassObject from Common.MultipleWorkspace import MultipleWorkspace as mws +from Common.DataType import SUP_MODULE_USER_DEFINED from Common.StringUtils import * from Common.Misc import PathClass from Common.Misc import GuidStructureByteArrayToGuidString @@ -94,7 +95,7 @@ class FfsInfStatement(FfsInfStatementClassObject): ModuleType = self.InfModule.ModuleType PlatformDataBase = GenFdsGlobalVariable.WorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, self.CurrentArch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag] - if ModuleType != DataType.SUP_MODULE_USER_DEFINED: + if ModuleType != SUP_MODULE_USER_DEFINED: for LibraryClass in PlatformDataBase.LibraryClasses.GetKeys(): if LibraryClass.startswith("NULL") and PlatformDataBase.LibraryClasses[LibraryClass, ModuleType]: self.InfModule.LibraryClasses[LibraryClass] = PlatformDataBase.LibraryClasses[LibraryClass, ModuleType] -- cgit v1.2.3