Skip to content

Commit 69ef2fc

Browse files
fix: properly escape regexes
1 parent d491662 commit 69ef2fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/etc/lldb_batchmode.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def print_debug(s):
4040

4141
def normalize_whitespace(s):
4242
"""Replace newlines, tabs, multiple spaces, etc with exactly one space"""
43-
return re.sub("\s+", " ", s)
43+
return re.sub(r"\s+", " ", s)
4444

4545

4646
def breakpoint_callback(frame, bp_loc, dict):
@@ -234,7 +234,7 @@ def watchdog():
234234
if (
235235
command == "run"
236236
or command == "r"
237-
or re.match("^process\s+launch.*", command)
237+
or re.match(r"^process\s+launch.*", command)
238238
):
239239
# Before starting to run the program, let the thread sleep a bit, so all
240240
# breakpoint added events can be processed

0 commit comments

Comments
 (0)