summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-03-08 08:42:02 +0100
committerChristian Breunig <christian@breunig.cc>2026-03-08 08:45:59 +0100
commita29d73d007a94c37c89bf473c9debbf24e3de633 (patch)
treec72a9b01c180785df86e82ae577fac61108b752e /python
parent7c520f8ec786f6cff411188498822eab00e69afd (diff)
downloadvyos-1x-a29d73d007a94c37c89bf473c9debbf24e3de633.tar.gz
vyos-1x-a29d73d007a94c37c89bf473c9debbf24e3de633.zip
op-mode: T8362: "compare" command lacks catch_broken_pipe decorator
When compare calculation is still in progress and it should be abourted by Ctrl+C, prevent a backtrace and catch the KeyboardInterrupt.
Diffstat (limited to 'python')
-rw-r--r--python/vyos/config_mgmt.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/vyos/config_mgmt.py b/python/vyos/config_mgmt.py
index 1ce397136..ec29f82b7 100644
--- a/python/vyos/config_mgmt.py
+++ b/python/vyos/config_mgmt.py
@@ -43,6 +43,7 @@ from vyos.load_config import LoadConfigError
from vyos.defaults import directories
from vyos.version import get_full_version_data
from vyos.utils.io import ask_yes_no
+from vyos.utils.io import catch_broken_pipe
from vyos.utils.boot import boot_configuration_complete
from vyos.utils.process import is_systemd_service_active
from vyos.utils.process import rc_cmd
@@ -560,6 +561,7 @@ Proceed ?"""
ret = tabulate(res_l, tablefmt='plain')
return ret
+ @catch_broken_pipe
def show_commit_diff(
self, rev: int, rev2: Optional[int] = None, commands: bool = False
) -> str:
@@ -800,6 +802,7 @@ Proceed ?"""
# entry_point for console script
#
+@catch_broken_pipe
def run():
from argparse import ArgumentParser, REMAINDER