lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260110152658.2c828621@kernel.org>
Date: Sat, 10 Jan 2026 15:26:58 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Stanislav Fomichev <stfomichev@...il.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
 pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
 donald.hunter@...il.com, gal@...dia.com
Subject: Re: [PATCH net-next 2/7] tools: ynl: cli: wrap the doc text if it's
 long

On Sat, 10 Jan 2026 11:07:57 -0800 Jakub Kicinski wrote:
> > > +                if sys.stdout.isatty():
> > > +                    term_width = shutil.get_terminal_size().columns
> > > +                else:
> > > +                    term_width = 80
> > > +                doc_text = textwrap.fill(attr.yaml['doc'], width=term_width,
> > > +                                         initial_indent=doc_prefix,
> > > +                                         subsequent_indent=doc_prefix)    
> > 
> > Any specific reason you wrap to 80 for !isatty?  
> 
> not really, just the default width of a classic terminal
> the textwrap library defaults to 70 which is another option tho
> I doubt there's a strong reason behind that value either..

Experimenting with this a little bit more it looks like shutil does the
right thing and returns 80 if not sys.stdout.isatty() Let me respin v2
with the condition removed.
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ