diff mbox series

[07/75] gentree: fix python quoting errors

Message ID 20240627234808.1253337-8-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show
Series backports: Update to kernel 6.1.95 | expand

Commit Message

Hauke Mehrtens June 27, 2024, 11:46 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 gentree.py | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/gentree.py b/gentree.py
index 05bb91b3..a80b0a8d 100755
--- a/gentree.py
+++ b/gentree.py
@@ -325,18 +325,18 @@  def get_rel_spec_stable(rel):
     """
     if ("rc" in rel):
         m = re.match(r"(?P<VERSION>\d+)\.+" \
-                     "(?P<PATCHLEVEL>\d+)[.]*" \
-                     "(?P<SUBLEVEL>\d*)" \
-                     "[-rc]+(?P<RC_VERSION>\d+)\-+" \
-                     "(?P<RELMOD_UPDATE>\d+)[-]*" \
-                     "(?P<RELMOD_TYPE>[usnpc]*)", \
+                     r"(?P<PATCHLEVEL>\d+)[.]*" \
+                     r"(?P<SUBLEVEL>\d*)" \
+                     r"[-rc]+(?P<RC_VERSION>\d+)\-+" \
+                     r"(?P<RELMOD_UPDATE>\d+)[-]*" \
+                     r"(?P<RELMOD_TYPE>[usnpc]*)", \
                      rel)
     else:
         m = re.match(r"(?P<VERSION>\d+)\.+" \
-                     "(?P<PATCHLEVEL>\d+)[.]*" \
-                     "(?P<SUBLEVEL>\d*)\-+" \
-                     "(?P<RELMOD_UPDATE>\d+)[-]*" \
-                     "(?P<RELMOD_TYPE>[usnpc]*)", \
+                     r"(?P<PATCHLEVEL>\d+)[.]*" \
+                     r"(?P<SUBLEVEL>\d*)\-+" \
+                     r"(?P<RELMOD_UPDATE>\d+)[-]*" \
+                     r"(?P<RELMOD_TYPE>[usnpc]*)", \
                      rel)
     if (not m):
         return m
@@ -347,8 +347,8 @@  def get_rel_spec_next(rel):
     Returns release specs for a linux-next backports based release.
     """
     m = re.match(r"(?P<DATE_VERSION>\d+)[-]*" \
-                 "(?P<RELMOD_UPDATE>\d*)[-]*" \
-                 "(?P<RELMOD_TYPE>[usnpc]*)", \
+                 r"(?P<RELMOD_UPDATE>\d*)[-]*" \
+                 r"(?P<RELMOD_TYPE>[usnpc]*)", \
                  rel)
     if (not m):
         return m
@@ -1099,7 +1099,7 @@  def process(kerneldir, copy_list_file, git_revision=None,
     # groups -- 50 seemed safer and is still fast)
     regexes = []
     for some_symbols in [disable_makefile[i:i + 50] for i in range(0, len(disable_makefile), 50)]:
-        r = '^(([^#].*((' + bpid.full_prefix_resafe + '|CONFIG_)(' + '|'.join([s for s in some_symbols]) + ')))\W)'
+        r = '^(([^#].*((' + bpid.full_prefix_resafe + '|CONFIG_)(' + '|'.join([s for s in some_symbols]) + r')))\W)'
         regexes.append(re.compile(r, re.MULTILINE))
     for f in maketree.get_makefiles():
         data = open(f, 'r').read()