ACK: [kteam-tools][PATCH] ktl: fix Debian.changelog LP: bug matching
Brad Figg
brad.figg at canonical.com
Mon Apr 18 17:58:00 UTC 2016
On Mon, Apr 18, 2016 at 07:53:07AM -0700, Kamal Mostafa wrote:
> 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
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Looks fine to me
--
Brad Figg brad.figg at canonical.com http://www.canonical.com
More information about the kernel-team
mailing list