Skip to content

Commit

Permalink
Merge pull request #110 from fls-bioinformatics-core/SimpleJobRunner-…
Browse files Browse the repository at this point in the history
…trap-for-missing-job-in-list

bcftbx/JobRunner: SimpleJobRunner.list() should trap for 'missing' jobs
  • Loading branch information
pjbriggs committed Aug 8, 2019
2 parents 9c527ed + 09ba1b3 commit d35979b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bcftbx/JobRunner.py
Expand Up @@ -308,7 +308,12 @@ def list(self):
"""
job_ids = []
for job_id in [jid for jid in self.__job_popen]:
p = self.__job_popen[job_id]
try:
p = self.__job_popen[job_id]
except KeyError:
# Job has been removed since the list
# was fetched? Ignore
continue
status = p.poll()
if status is None:
job_ids.append(job_id)
Expand Down

0 comments on commit d35979b

Please sign in to comment.