diff --git a/gerrit/update_bug.py b/gerrit/update_bug.py index dc385bdc..e9781250 100755 --- a/gerrit/update_bug.py +++ b/gerrit/update_bug.py @@ -136,7 +136,7 @@ def process_bugtask(launchpad, bugtask, git_log, args): def find_bugs(launchpad, git_log, args): """Find bugs referenced in the git log and return related bugtasks""" - bug_regexp = r'([Bb]ug|[Ll][Pp])\s*[#:]?\s*(\d+)' + bug_regexp = r'([Bb]ug|[Ll][Pp])[\s#:]*(\d+)' tokens = re.split(bug_regexp, git_log) # Extract unique bug tasks