summaryrefslogtreecommitdiff
path: root/src/op_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-03-14 15:07:33 +0100
committerGitHub <noreply@github.com>2021-03-14 15:07:33 +0100
commitdfa91f60f8bf0eeb3e7964ecc5d421a23521a931 (patch)
tree85153f4f6917a05b8dafd6dcb8129b5d51329dd8 /src/op_mode
parent2785a486f798c5e36d59c58720334f7bdffcbb3e (diff)
parent8fc658f521aae61964919bc5017935cac611e000 (diff)
downloadvyos-1x-dfa91f60f8bf0eeb3e7964ecc5d421a23521a931.tar.gz
vyos-1x-dfa91f60f8bf0eeb3e7964ecc5d421a23521a931.zip
Merge pull request #773 from sever-sever/T3403
pppoe: T3403: Fix show sessions interrupt for op-mode
Diffstat (limited to 'src/op_mode')
-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))