diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2024-07-23 10:21:42 -0700 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2024-07-23 10:23:50 -0700 |
| commit | 8916953b534f64a7545860ad5b4b36dc2544f33a (patch) | |
| tree | 98fa71269f150691adbc58aee6d843e608029c64 /python/makefile.py | |
| parent | 04b818dd4ca1b490da500aff5f40f07ff8e20396 (diff) | |
build: fix a few python string escape warnings
When using a regex (or anything that uses `\?` escapes) in python, raw
strings (`r"content"`) should be used so python doesn't consume the
escapes itself. Otherwise we get either broken behavior and/or
`SyntaxWarning: invalid escape sequence '\['`
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'python/makefile.py')
| -rw-r--r-- | python/makefile.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/makefile.py b/python/makefile.py index 573871fb68..45f032296f 100644 --- a/python/makefile.py +++ b/python/makefile.py @@ -91,7 +91,7 @@ lines = before.splitlines() autoderp = "#AUTODERP# " out_lines = [] bcdeps = [] -make_rule_re = re.compile("^([^:\s]+):\s*([^:\s]+)\s*($|\n)") +make_rule_re = re.compile(r"^([^:\s]+):\s*([^:\s]+)\s*($|\n)") while lines: line = lines.pop(0) |
