astconfigparser.py: Fix regex pattern error by properly escaping string

"SyntaxWarning: invalid escape sequence '\s'" occurs when using the pjsip
migration script because '\' is an escape character in Python. Instead,
use a raw string for the regex.
pull/1788/head
Julian C. Dunn 2 weeks ago committed by github-actions[bot]
parent 8754521c2c
commit 3eb7828df2

@ -240,7 +240,7 @@ def try_include(line):
included filename, otherwise None.
"""
match = re.match('^#include\s*([^;]+).*$', line)
match = re.match(r'^#include\s*([^;]+).*$', line)
if match:
trimmed = match.group(1).rstrip()
quoted = re.match('^"([^"]+)"$', trimmed)

Loading…
Cancel
Save