From d7927e0ac625eb1031bc5f28e86e92871a310a11 Mon Sep 17 00:00:00 2001 From: Christian Busch Date: Wed, 2 Nov 2022 09:28:05 +0100 Subject: [PATCH] fix: catch process output error --- getdeck/utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/getdeck/utils.py b/getdeck/utils.py index 6443413..4941632 100644 --- a/getdeck/utils.py +++ b/getdeck/utils.py @@ -128,8 +128,11 @@ def _execute( process.communicate(stdin) try: if print_output: - for stdout_line in iter(process.stdout.readline, ""): - print(stdout_line, end="", flush=True) + try: + for stdout_line in iter(process.stdout.readline, ""): + print(stdout_line, end="", flush=True) + except Exception as e: + logger.warning(f"Failed to display process output: {str(e)}") process.wait() except KeyboardInterrupt: try: