]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
script/backport-create-issue: fix the syntax warning 63128/head
authorKyr Shatskyy <kyrylo.shatskyy@gmail.com>
Tue, 6 May 2025 11:37:30 +0000 (13:37 +0200)
committerKyr Shatskyy <kyrylo.shatskyy@gmail.com>
Tue, 6 May 2025 11:37:30 +0000 (13:37 +0200)
This suppresses the message:
  ./src/script/backport-create-issue:180: SyntaxWarning: invalid escape sequence '\w'
    issue['backports'] = set(re.findall('\w+', field['value']))

Fixes: https://tracker.ceph.com/issues/71212
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@gmail.com>
src/script/backport-create-issue

index 185d30cc25c99151f7b9e20ff9f9c096f2378bee..e8b351af7aa03b8149a3564233605ad39b033ce2 100755 (executable)
@@ -177,7 +177,7 @@ def url(issue):
 def set_backport(issue):
     for field in issue['custom_fields']:
         if field['name'] == 'Backport' and field['value'] != 0:
-            issue['backports'] = set(re.findall('\w+', field['value']))
+            issue['backports'] = set(re.findall(r'\w+', field['value']))
             logging.debug("backports for " + str(issue['id']) +
                           " is " + str(field['value']) + " " +
                           str(issue['backports']))