summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Workspace/MetaFileParser.py
diff options
context:
space:
mode:
authorJoey Vagedes via groups.io <joeyvagedes=microsoft.com@groups.io>2023-12-06 12:27:02 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-12-21 00:33:31 +0000
commit9f0061a03b61d282fbc0ba5be22155d06a5e64a1 (patch)
tree18a4fe05d2d43b7762bc70842790bacd3a3296ec /BaseTools/Source/Python/Workspace/MetaFileParser.py
parent89705ad6c6342e3bd635bed89608e25f74372600 (diff)
downloadedk2-9f0061a03b61d282fbc0ba5be22155d06a5e64a1.tar.gz
edk2-9f0061a03b61d282fbc0ba5be22155d06a5e64a1.tar.bz2
edk2-9f0061a03b61d282fbc0ba5be22155d06a5e64a1.zip
BaseTools: Resolve regex syntax warnings
Switches regex patterns to raw text to resolve python 3.12 syntax warnings in regards to invalid escape sequences, as is suggested by the re (regex) module in python. Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Joey Vagedes <joey.vagedes@gmail.com> Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/MetaFileParser.py')
-rw-r--r--BaseTools/Source/Python/Workspace/MetaFileParser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py
index 3508591b28..73a1654edb 100644
--- a/BaseTools/Source/Python/Workspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py
@@ -1897,7 +1897,7 @@ class DecParser(MetaFileParser):
self._SectionType = []
ArchList = set()
PrivateList = set()
- Line = re.sub(',[\s]*', TAB_COMMA_SPLIT, self._CurrentLine)
+ Line = re.sub(r',[\s]*', TAB_COMMA_SPLIT, self._CurrentLine)
for Item in Line[1:-1].split(TAB_COMMA_SPLIT):
if Item == '':
EdkLogger.error("Parser", FORMAT_UNKNOWN_ERROR,