From cefc8d8821f0a5ec7995901146dd6b055d7b956a Mon Sep 17 00:00:00 2001 From: Yunhua Feng Date: Mon, 6 Aug 2018 09:02:25 +0800 Subject: [PATCH] BaseTools: Use gGuidPattern for Guid regular expression Use GlobalData.py gGuidPattern for Guid regular expression Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/GenFds/GenFds.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Python/GenFds/GenFds.py index 156aae1d0e..2307a19cbe 100644 --- a/BaseTools/Source/Python/GenFds/GenFds.py +++ b/BaseTools/Source/Python/GenFds/GenFds.py @@ -44,6 +44,7 @@ from Common.MultipleWorkspace import MultipleWorkspace as mws from . import FfsFileStatement import glob from struct import unpack +from Common.GlobalData import gGuidPattern ## Version and Copyright versionNumber = "1.0" + ' ' + gBUILD_VERSION @@ -605,11 +606,7 @@ class GenFds : GuidDict = {} ModuleList = [] FileGuidList = [] - GuidPattern = re.compile("\s*([0-9a-fA-F]){8}-" - "([0-9a-fA-F]){4}-" - "([0-9a-fA-F]){4}-" - "([0-9a-fA-F]){4}-" - "([0-9a-fA-F]){12}\s*") + GuidPattern = gGuidPattern for Arch in ArchList: PlatformDataBase = BuildDb.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag] for ModuleFile in PlatformDataBase.Modules: