From 421d1877ebcb326b8fc689c00d1a0e2f4bcbe9f3 Mon Sep 17 00:00:00 2001 From: hategan Date: Thu, 13 Feb 2025 00:38:45 -0800 Subject: [PATCH] We already check for exec not being null earlier. --- src/psij/executors/batch/batch_scheduler_executor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/psij/executors/batch/batch_scheduler_executor.py b/src/psij/executors/batch/batch_scheduler_executor.py index 20ba5764..5a211030 100644 --- a/src/psij/executors/batch/batch_scheduler_executor.py +++ b/src/psij/executors/batch/batch_scheduler_executor.py @@ -668,8 +668,7 @@ def _poll(self) -> None: jobs_copy = dict(self._jobs) logger.info('Polling for %s jobs', len(jobs_copy)) try: - if exec: - out = exec._run_command(exec.get_status_command(jobs_copy.keys())) + out = exec._run_command(exec.get_status_command(jobs_copy.keys())) except subprocess.CalledProcessError as ex: out = ex.output exit_code = ex.returncode