← Back to team overview

geda-developers team mailing list archive

Re: Commit robot failure

 

2012/12/3 Peter Clifton <pcjc2@xxxxxxxxx>:

> It would appear that the regex:
>
> closes_bug_re  = re.compile (r'\s*Closes-bug: lp-(\d+)|\s*Fixes-bug: lp-(\d+)', re.IGNORECASE)
>
> (Which was my broken code), causes re.findall (pattern, commit_message)
> to return a tuple, not a scalar string.

There are two pairs of capturing parentheses, so you get a tuple in result.
I would try:

closes_bug_re = re.compile (r'^\s*(?:Closes|Fixes)-bug: lp-(\d+)$',
re.IGNORECASE | re.MULTILINE)

with the additional change to constrain matches to one directive per line.

Krzysztof Kościuszkiewicz


References