diff options
| author | Daniil Baturin <daniil@vyos.io> | 2026-06-30 16:29:51 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-30 16:29:51 +0100 |
| commit | a4d2e764e114de8d7c446e461a51ff78bbc0fbbb (patch) | |
| tree | 370bc703c753e964fc8e6aba2758444361b591a1 | |
| parent | cc0d4c4316c8aa297261da659bbb024e0742306c (diff) | |
| parent | fe6b32d3e31a94d5e2156bcf2273e42a172b90a1 (diff) | |
| download | vyos-1x-a4d2e764e114de8d7c446e461a51ff78bbc0fbbb.tar.gz vyos-1x-a4d2e764e114de8d7c446e461a51ff78bbc0fbbb.zip | |
Merge pull request #5304 from c-po/fix-catch-broken-pipe-decorator
vyos.utils: T8981: catch_broken_pipe() decorator must return func(*args, **kwargs)
| -rw-r--r-- | python/vyos/utils/io.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/utils/io.py b/python/vyos/utils/io.py index 3efb55ddc..77e30cbb0 100644 --- a/python/vyos/utils/io.py +++ b/python/vyos/utils/io.py @@ -117,7 +117,7 @@ def catch_broken_pipe(func): import sys def wrapped(*args, **kwargs): try: - func(*args, **kwargs) + return func(*args, **kwargs) except (BrokenPipeError, KeyboardInterrupt): # Flush output to /dev/null and bail out. os.dup2(os.open(os.devnull, os.O_WRONLY), sys.stdout.fileno()) # pylint: disable = no-member |
