Skip to content

Commit

Permalink
Add command to CalledProcessError
Browse files Browse the repository at this point in the history
  • Loading branch information
Icemole committed Aug 19, 2024
1 parent 36ec249 commit 0d5ea83
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion sisyphus/load_sharing_facility_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion sisyphus/son_of_grid_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0d5ea83

Please sign in to comment.