From e7c3137708652bea9c0f8b5fe703717bb6f49d84 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Fri, 19 Nov 2021 15:37:39 -0600 Subject: http-api: T4003: fix output when no tty attached to stdout, e.g., api (cherry picked from commit 82ea3b4f3c12023ce17f1062785b6238f457673d) --- src/op_mode/show_interfaces.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/op_mode') diff --git a/src/op_mode/show_interfaces.py b/src/op_mode/show_interfaces.py index aef2d8060..281d25e30 100755 --- a/src/op_mode/show_interfaces.py +++ b/src/op_mode/show_interfaces.py @@ -85,10 +85,8 @@ def split_text(text, used=0): used: number of characted already used in the screen """ no_tty = call('tty -s') - if no_tty: - return text.split() - returned = cmd('stty size') + returned = cmd('stty size') if not no_tty else '' if len(returned) == 2: rows, columns = [int(_) for _ in returned] else: -- cgit v1.2.3