BaseTools: AutoGen - refactor more functions only called in __init__

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
Carsey, Jaben 2018-04-28 06:32:43 +08:00 committed by Yonghong Zhu
parent 1549328f5f
commit cb7e6aa77a
1 changed files with 40 additions and 49 deletions

View File

@ -66,18 +66,9 @@ EFI_HII_PACKAGE_TYPE_SYSTEM_END = 0xFF
class IdfFileClassObject(object): class IdfFileClassObject(object):
def __init__(self, FileList = []): def __init__(self, FileList = []):
self.FileList = FileList
self.ImageFilesDict = {} self.ImageFilesDict = {}
self.ImageIDList = [] self.ImageIDList = []
if len(self.FileList) > 0:
self.LoadIdfFiles(FileList)
def LoadIdfFiles(self, FileList):
if len(FileList) > 0:
for File in FileList: for File in FileList:
self.LoadIdfFile(File)
def LoadIdfFile(self, File = None):
if File is None: if File is None:
EdkLogger.error("Image Definition File Parser", PARSER_ERROR, 'No Image definition file is given.') EdkLogger.error("Image Definition File Parser", PARSER_ERROR, 'No Image definition file is given.')
self.File = File self.File = File