[U-Boot] [PATCH] tools: genboardscfg.py, use default terminal size if undetectable
Tom Rini
trini at ti.com
Thu Aug 7 13:37:20 CEST 2014
On Thu, Aug 07, 2014 at 12:46:53PM +0200, Roger Meier wrote:
> The existing terminalsize detection raised an exception on build
> server. Removes the exception and return a default value.
>
> Signed-off-by: Roger Meier <roger at bufferoverflow.ch>
> CC: Masahiro Yamada <yamada.m at jp.panasonic.com>
> ---
> tools/genboardscfg.py | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/tools/genboardscfg.py b/tools/genboardscfg.py
> index 734d90b..892c033 100755
> --- a/tools/genboardscfg.py
> +++ b/tools/genboardscfg.py
> @@ -58,11 +58,9 @@ def get_terminal_columns():
> try:
> ret = fcntl.ioctl(sys.stdout.fileno(), termios.TIOCGWINSZ, arg)
> except IOError as exception:
> - if exception.errno != errno.ENOTTY:
> - raise
> # If 'Inappropriate ioctl for device' error occurs,
> - # stdout is probably redirected. Return 0.
> - return 0
> + # stdout is probably redirected. Return default size.
> + return (25, 80)
25 not 24?
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140807/83fb75a2/attachment.pgp>
More information about the U-Boot
mailing list