mirror of
https://github.com/lubuntu-team/lugito.git
synced 2025-05-01 21:11:28 +00:00
Don't fail if the regex doesn't match.
This commit is contained in:
parent
605e65df66
commit
e1a859fc5e
4
lugito
4
lugito
@ -225,7 +225,9 @@ def commithook():
|
|||||||
if lpname:
|
if lpname:
|
||||||
# https://help.launchpad.net/Code/Git#Linking_to_bugs
|
# https://help.launchpad.net/Code/Git#Linking_to_bugs
|
||||||
regexp = re.compile(r"lp:\s+\#\d+(?:,\s*\#\d+)*")
|
regexp = re.compile(r"lp:\s+\#\d+(?:,\s*\#\d+)*")
|
||||||
lpbugs = regexp.search(commitmessage.lower()).group(0).strip("lp: ").replace("#", "")
|
regexpsearch = regexp.search(commitmessage.lower())
|
||||||
|
if regexpsearch:
|
||||||
|
lpbugs = regexpsearch.group(0).strip("lp: ").replace("#", "")
|
||||||
for bug in lpbugs.split(", "):
|
for bug in lpbugs.split(", "):
|
||||||
goodtask = None
|
goodtask = None
|
||||||
lbug = lp.load("/bugs/"+str(bug).strip())
|
lbug = lp.load("/bugs/"+str(bug).strip())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user