Note: lists.cip-project.org will be down for maintenance on Monday, September 26th, starting at 9AM Pacific Time (4PM Monday September 26, 2022 UTC), for approximately one hour.
Chen-Yu Tsai (Moxa) <wens@...>
On Fri, Sep 25, 2020 at 12:00 PM Daniel Sangorrin
I believe it would be better to include the "CVE => " string in the full text
passed to textwrap. That would make all lines properly wrapped at the given
Also, textwrap can handle indentation for subsequent lines, so you don't have
to handle that yourself. And it might be easier to read if they matched up
with the beginning of the description in the first line.
Last, you could use join() to combine the lines.
So I would rewrite the part as:
text = cve_id + ' => ' +
print('\n'.join(textwrap.wrap(text, 80, subsequent_indent=' ' *
(len(cve_id) + 4), break_long_words=False)))
+ print(cve_id, '=>',wrap_description)