[PATCH] pylint wants regexes with backslashes to be specified with 'r'.

Chris Lumens clumens at redhat.com
Mon Oct 28 21:16:17 UTC 2013


---
 scripts/makebumpver | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/makebumpver b/scripts/makebumpver
index f3c00b9..5647cdd 100755
--- a/scripts/makebumpver
+++ b/scripts/makebumpver
@@ -107,7 +107,7 @@ class MakeBumpVer:
         fields = lines[0].split(' ')
 
         if len(fields) == 2 and fields[1].startswith('rhel'):
-            branch_pattern="^rhel(\d+)-(.*)"
+            branch_pattern=r"^rhel(\d+)-(.*)"
             m = re.match(branch_pattern, fields[1])
             if m:
                 return m.group(1)
@@ -216,7 +216,7 @@ class MakeBumpVer:
             return True
 
         bzentry = self._queryBug(bug)
-        ack_pattern="rhel-%s\.\d+\.\d+" % self.rhel
+        ack_pattern=r"rhel-%s\.\d+\.\d+" % self.rhel
         for f in bzentry.flags:
             if re.match(ack_pattern, f['name']) and f['status'] == '+':
                 return True
-- 
1.8.3.1



More information about the anaconda-patches mailing list