2012/12/3 Peter Clifton <[email protected]>: > 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 -- Mailing list: https://launchpad.net/~geda-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~geda-developers More help : https://help.launchpad.net/ListHelp

