From 92f210b512e094e1e0ac0685f0d0897d5ffd45c8 Mon Sep 17 00:00:00 2001 From: Jithu Murugan <j.murugan@fz-juelich.de> Date: Tue, 25 Feb 2025 11:43:50 +0100 Subject: [PATCH] - Added a 10 minute timeout for testing if any specific command hangs on subprocess.run command! --- dedal/utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dedal/utils/utils.py b/dedal/utils/utils.py index 9fc82ad5..de5529dc 100644 --- a/dedal/utils/utils.py +++ b/dedal/utils/utils.py @@ -30,7 +30,7 @@ def run_command(*args, logger=logging.getLogger(__name__), info_msg: str = '', e exception=None, **kwargs): try: logger.info(f'{info_msg}: args: {args}') - return subprocess.run(args, **kwargs) + return subprocess.run(args, **kwargs, timeout=10 * 60) except subprocess.CalledProcessError as e: if exception_msg is not None: logger.error(f"{exception_msg}: {e}") -- GitLab