From 0d5ea83156c97f7c64e7a4de4619dc2ed2779a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nahuel=20Unai=20Rosell=C3=B3=20Beneitez?= Date: Mon, 19 Aug 2024 07:21:30 -0400 Subject: [PATCH] Add command to CalledProcessError --- sisyphus/load_sharing_facility_engine.py | 4 +++- .../simple_linux_utility_for_resource_management_engine.py | 4 +++- sisyphus/son_of_grid_engine.py | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sisyphus/load_sharing_facility_engine.py b/sisyphus/load_sharing_facility_engine.py index b9328e5..42997ad 100644 --- a/sisyphus/load_sharing_facility_engine.py +++ b/sisyphus/load_sharing_facility_engine.py @@ -255,7 +255,9 @@ def queue_state(self): try: out, err, retval = self.system_call(system_command) if retval != 0: - raise subprocess.CalledProcessError(retval, self._system_call_error_warn_msg(system_command)) + raise subprocess.CalledProcessError( + retval, system_command, self._system_call_error_warn_msg(system_command) + ) except subprocess.TimeoutExpired: logging.warning(self._system_call_timeout_warn_msg(system_command)) time.sleep(gs.WAIT_PERIOD_SSH_TIMEOUT) diff --git a/sisyphus/simple_linux_utility_for_resource_management_engine.py b/sisyphus/simple_linux_utility_for_resource_management_engine.py index 39b99bc..44b88da 100644 --- a/sisyphus/simple_linux_utility_for_resource_management_engine.py +++ b/sisyphus/simple_linux_utility_for_resource_management_engine.py @@ -313,7 +313,9 @@ def queue_state(self): try: out, err, retval = self.system_call(system_command) if retval != 0: - raise subprocess.CalledProcessError(retval, self._system_call_error_warn_msg(system_command)) + raise subprocess.CalledProcessError( + retval, system_command, self._system_call_error_warn_msg(system_command) + ) except subprocess.TimeoutExpired: logging.warning(self._system_call_timeout_warn_msg(system_command)) time.sleep(gs.WAIT_PERIOD_SSH_TIMEOUT) diff --git a/sisyphus/son_of_grid_engine.py b/sisyphus/son_of_grid_engine.py index 0c5b6db..b65423c 100644 --- a/sisyphus/son_of_grid_engine.py +++ b/sisyphus/son_of_grid_engine.py @@ -324,7 +324,9 @@ def queue_state(self): try: out, err, retval = self.system_call(system_command) if retval != 0: - raise subprocess.CalledProcessError(retval, self._system_call_error_warn_msg(system_command)) + raise subprocess.CalledProcessError( + retval, system_command, self._system_call_error_warn_msg(system_command) + ) except subprocess.TimeoutExpired: logging.warning(self._system_call_timeout_warn_msg(system_command)) time.sleep(gs.WAIT_PERIOD_SSH_TIMEOUT)