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.
This commit is contained in:
Julian C. Dunn
2026-02-17 18:06:59 -08:00
committed by Asterisk Development Team
parent 09e87f5a15
commit 08e66e2e07

View File

@@ -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)