diff --git a/python/TestHarness/schedulers/RunHPC.py b/python/TestHarness/schedulers/RunHPC.py index a925c0ad0a9f..2815b533cb59 100644 --- a/python/TestHarness/schedulers/RunHPC.py +++ b/python/TestHarness/schedulers/RunHPC.py @@ -783,7 +783,8 @@ def killHPCJobs(self, functor): def killRemaining(self, keyboard=False): """Kills all currently running HPC jobs""" - functor = lambda hpc_job: hpc_job.state not in [hpc_job.State.killed, hpc_job.State.done] + running_states = [HPCJob.State.killed, HPCJob.State.done] + functor = lambda hpc_job: hpc_job is not None and hpc_job.state not in running_states killed_jobs = self.killHPCJobs(functor) if keyboard and killed_jobs: print(f'\nAttempted to kill remaining {killed_jobs} HPC jobs...') @@ -990,7 +991,7 @@ def setupRunEnvironment(self, harness): # --hpc-pre-source contents if self.options.hpc_pre_source: - submission_env['PRE_SOURCE_FILE'] = options.hpc_pre_source + submission_env['PRE_SOURCE_FILE'] = self.options.hpc_pre_source submission_env['PRE_SOURCE_CONTENTS'] = self.source_contents submission_env['SOURCE_FILE'] = options.hpc_pre_source