Skip to content

Commit

Permalink
Default value of None for _tasks.pop to avoid KeyError
Browse files Browse the repository at this point in the history
  • Loading branch information
mtweiden committed Oct 29, 2024
1 parent b7917dc commit 94a0ef5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bqskit/runtime/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ def _process_task_completion(self, task: RuntimeTask, result: Any) -> None:
self._conn.send((RuntimeMessage.RESULT, packaged_result))

# Remove task
self._tasks.pop(task.return_address)
self._tasks.pop(task.return_address, None)

# Cancel any open tasks
for mailbox_id in self._active_task.owned_mailboxes:
Expand Down

0 comments on commit 94a0ef5

Please sign in to comment.