[kteam-tools][PATCH] ktl: fix Debian.changelog LP: bug matching
Kamal Mostafa
kamal at canonical.com
Mon Apr 18 14:53:07 UTC 2016
Changelog parsing for "LP: #NNNNNN" is bugged in two ways, making it
consider any "#N" string to be a Launchpad bug number. For example,
it thinks this changelog line is a bug number:
* PKCS#7: pkcs7_validate_trust(): initialize the _trusted output
So verify-release-ready yields: "LP: #7 is not package linux: fail"
Make it work work as intended:
- use search() instead of match(), to find lines *containing* "LP: #NNNNNN"
- fix the conditional, so that it actually acts on the result of that
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
ktl/debian.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ktl/debian.py b/ktl/debian.py
index 6b67cfc..dd2703a 100644
--- a/ktl/debian.py
+++ b/ktl/debian.py
@@ -176,8 +176,8 @@ class Debian:
bugs = []
else:
# find bug numbers and append them to the list
- bug_line_matches = cls.bug_line_rc.match(line)
- if bug_line_matches != 0:
+ bug_line_matches = cls.bug_line_rc.search(line)
+ if bug_line_matches:
bug_matches = findall(cls.bug_rc,line)
if bug_matches:
bugs.extend( bug_matches )
--
2.7.4
More information about the kernel-team
mailing list