diff mbox series

[cip-kernel-sec,2/3] report_affected: Delete extra blank lines between CVEs

Message ID 20200925035927.1958987-3-daniel.sangorrin@toshiba.co.jp (mailing list archive)
State Not Applicable
Headers show
Series None | expand

Commit Message

Daniel Sangorrin Sept. 25, 2020, 3:59 a.m. UTC
From: nguyen van hieu <hieu2.nguyenvan@toshiba.co.jp>

When using the --show-description option CVEs had blank
lines between them. Remove them to make it more compact.

Signed-off-by: nguyen van hieu <hieu2.nguyenvan@toshiba.co.jp>
Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
---
 scripts/report_affected.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chen-Yu Tsai Oct. 8, 2020, 7:59 a.m. UTC | #1
On Fri, Sep 25, 2020 at 12:00 PM Daniel Sangorrin
<daniel.sangorrin@toshiba.co.jp> wrote:
>
> From: nguyen van hieu <hieu2.nguyenvan@toshiba.co.jp>
>
> When using the --show-description option CVEs had blank
> lines between them. Remove them to make it more compact.
>
> Signed-off-by: nguyen van hieu <hieu2.nguyenvan@toshiba.co.jp>
> Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>

Reviewed-by: Chen-Yu Tsai (Moxa) <wens@csie.org>

Though these occurrences seem to be very rare.

> ---
>  scripts/report_affected.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/report_affected.py b/scripts/report_affected.py
> index a181d97..9894602 100755
> --- a/scripts/report_affected.py
> +++ b/scripts/report_affected.py
> @@ -141,7 +141,7 @@ def main(git_repo, remotes, only_fixed_upstream,
>                  wrap_description = ''
>                  for line in textwrap.wrap(description, 80, break_long_words=False):
>                      wrap_description += line + '\n  '
> -                print(cve_id, '=>',wrap_description)
> +                print(cve_id, '=>',wrap_description.strip())
>          else:
>              print('%s:' % branch['full_name'], *sorted_cve_ids)
>
> --
> 2.25.1
>
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5510): https://lists.cip-project.org/g/cip-dev/message/5510
Mute This Topic: https://lists.cip-project.org/mt/77073065/4520428
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129116/1171672734/xyzzy [patchwork-cip-dev@patchwork.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
Chen-Yu Tsai Oct. 8, 2020, 8 a.m. UTC | #2
On Thu, Oct 8, 2020 at 3:59 PM Chen-Yu Tsai <wens@csie.org> wrote:
>
> On Fri, Sep 25, 2020 at 12:00 PM Daniel Sangorrin
> <daniel.sangorrin@toshiba.co.jp> wrote:
> >
> > From: nguyen van hieu <hieu2.nguyenvan@toshiba.co.jp>
> >
> > When using the --show-description option CVEs had blank
> > lines between them. Remove them to make it more compact.
> >
> > Signed-off-by: nguyen van hieu <hieu2.nguyenvan@toshiba.co.jp>
> > Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
>
> Reviewed-by: Chen-Yu Tsai (Moxa) <wens@csie.org>
>
> Though these occurrences seem to be very rare.

Jumped the gun. This patch is no longer needed if you use join()
to combine the lines.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5511): https://lists.cip-project.org/g/cip-dev/message/5511
Mute This Topic: https://lists.cip-project.org/mt/77073065/4520428
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129116/1171672734/xyzzy [patchwork-cip-dev@patchwork.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
diff mbox series

Patch

diff --git a/scripts/report_affected.py b/scripts/report_affected.py
index a181d97..9894602 100755
--- a/scripts/report_affected.py
+++ b/scripts/report_affected.py
@@ -141,7 +141,7 @@  def main(git_repo, remotes, only_fixed_upstream,
                 wrap_description = ''
                 for line in textwrap.wrap(description, 80, break_long_words=False):
                     wrap_description += line + '\n  '
-                print(cve_id, '=>',wrap_description)
+                print(cve_id, '=>',wrap_description.strip())
         else:
             print('%s:' % branch['full_name'], *sorted_cve_ids)