summaryrefslogtreecommitdiff
path: root/src/op_mode/ppp-server-ctrl.py
diff options
context:
space:
mode:
authorsever-sever <v.gletenko@vyos.io>2021-03-12 17:05:26 +0000
committersever-sever <v.gletenko@vyos.io>2021-03-12 17:35:19 +0000
commit8fc658f521aae61964919bc5017935cac611e000 (patch)
tree2b4a456aca9f1c60ce1e7b13081850ac4aa05e8a /src/op_mode/ppp-server-ctrl.py
parent8262556dd809babdbc75369dae654eca7f021964 (diff)
downloadvyos-1x-8fc658f521aae61964919bc5017935cac611e000.tar.gz
vyos-1x-8fc658f521aae61964919bc5017935cac611e000.zip
pppoe: T3403: Fix show sessions interrupt for op-mode
Diffstat (limited to 'src/op_mode/ppp-server-ctrl.py')
-rwxr-xr-xsrc/op_mode/ppp-server-ctrl.py5
1 files changed, 4 insertions, 1 deletions
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))