Skip to content

Commit 2ed1bc4

Browse files
committed
fix: typing for mypy 0.940 → 0.960
1 parent 94b2a50 commit 2ed1bc4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

securedrop_client/queue.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ def _check_for_duplicate_jobs(self, job: QueueJob) -> bool:
9292
stored on self.current_job. We check that the job to be added is not among them.
9393
"""
9494
in_progress_jobs = [in_progress_job for priority, in_progress_job in self.queue.queue]
95-
in_progress_jobs.append(self.current_job)
95+
if self.current_job is not None:
96+
in_progress_jobs.append(self.current_job)
9697
if job in in_progress_jobs:
9798
logger.debug("Duplicate job {}, skipping".format(job))
9899
return True

0 commit comments

Comments
 (0)