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