From 82ea3b4f3c12023ce17f1062785b6238f457673d 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 --- src/op_mode/show_interfaces.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/op_mode/show_interfaces.py') diff --git a/src/op_mode/show_interfaces.py b/src/op_mode/show_interfaces.py index 3d50eb938..eac068274 100755 --- a/src/op_mode/show_interfaces.py +++ b/src/op_mode/show_interfaces.py @@ -94,10 +94,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