From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BA93D21D490E4 for ; Thu, 10 Aug 2017 19:49:01 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP; 10 Aug 2017 19:51:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,356,1498546800"; d="scan'208";a="1161523884" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.121]) by orsmga001.jf.intel.com with ESMTP; 10 Aug 2017 19:51:20 -0700 From: Yonghong Zhu To: edk2-devel@lists.01.org Cc: Yanyan Zhang , Liming Gao Date: Fri, 11 Aug 2017 10:51:17 +0800 Message-Id: <1502419877-34960-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [Patch] BaseTools: Support TabSpace between section tag in DEC file X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Aug 2017 02:49:01 -0000 From: Yanyan Zhang 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 --- 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 e98352a..b756361 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -1752,11 +1752,11 @@ class DecParser(MetaFileParser): self._Scope = [] self._SectionName = '' 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, "section name can NOT be empty or incorrectly use separator comma", self.MetaFile, self._LineIndex + 1, self._CurrentLine) -- 2.6.1.windows.1