From 0795920568ca2efbea71be8510f6bda1e8ef3e8a Mon Sep 17 00:00:00 2001 From: Yanyan Zhang Date: Fri, 11 Aug 2017 10:30:09 +0800 Subject: [PATCH] BaseTools: Support TabSpace between section tag in DEC file Per DEC spec, multiple section tag use to separate, and it can support Tab, so this patch fix the bug to use Tab. ::= {} {} ::= * Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yanyan Zhang Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/Workspace/MetaFileParser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py index e98352ade5..b756361afd 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -1754,7 +1754,7 @@ class DecParser(MetaFileParser): self._SectionType = [] ArchList = set() PrivateList = set() - Line = self._CurrentLine.replace("%s%s" % (TAB_COMMA_SPLIT, TAB_SPACE_SPLIT), TAB_COMMA_SPLIT) + Line = re.sub(',[\s]*', TAB_COMMA_SPLIT, self._CurrentLine) for Item in Line[1:-1].split(TAB_COMMA_SPLIT): if Item == '': EdkLogger.error("Parser", FORMAT_UNKNOWN_ERROR, -- 2.39.2