From 8fc658f521aae61964919bc5017935cac611e000 Mon Sep 17 00:00:00 2001 From: sever-sever Date: Fri, 12 Mar 2021 17:05:26 +0000 Subject: pppoe: T3403: Fix show sessions interrupt for op-mode --- src/op_mode/ppp-server-ctrl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/op_mode') diff --git a/src/op_mode/ppp-server-ctrl.py b/src/op_mode/ppp-server-ctrl.py index 171107b4a..8a4e846b2 100755 --- a/src/op_mode/ppp-server-ctrl.py +++ b/src/op_mode/ppp-server-ctrl.py @@ -59,7 +59,10 @@ def main(): output, err = popen(cmd_dict['cmd_base'].format(cmd_dict['vpn_types'][args.proto]) + args.action + ses_pattern, stderr=DEVNULL, decode='utf-8') if not err: - print(output) + try: + print(output) + except BrokenPipeError: + sys.exit(0) else: print("{} server is not running".format(args.proto)) -- cgit v1.2.3