diff --git a/setup.py b/setup.py index 221e3a2..851d331 100755 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ import codecs changelog = "debian/changelog" if os.path.exists(changelog): head = codecs.open(changelog, 'r', 'utf-8', 'replace').readline() - match = re.compile(".*\((.*)\).*").match(head) + match = re.compile(r".*\((.*)\).*").match(head) if match: version = match.group(1) diff --git a/ubuntutools/sponsor_patch/bugtask.py b/ubuntutools/sponsor_patch/bugtask.py index 167cef7..ebb40f6 100644 --- a/ubuntutools/sponsor_patch/bugtask.py +++ b/ubuntutools/sponsor_patch/bugtask.py @@ -43,7 +43,7 @@ class BugTask(object): self.bug_task = bug_task self.launchpad = launchpad - components = re.split(" \(| ", self.bug_task.bug_target_name.strip(")")) + components = re.split(r" \(| ", self.bug_task.bug_target_name.strip(")")) assert len(components) >= 1 and len(components) <= 3 if len(components) == 1: self.package = None @@ -59,7 +59,7 @@ class BugTask(object): self.series = components[2].lower() if self.package is None: - title_re = '^Sync ([a-z0-9+.-]+) [a-z0-9.+:~-]+ \([a-z]+\) from.*' + title_re = r'^Sync ([a-z0-9+.-]+) [a-z0-9.+:~-]+ \([a-z]+\) from.*' match = re.match(title_re, self.get_bug_title(), re.U | re.I) if match is not None: self.package = match.group(1)