diff --git a/bbot/core/engine.py b/bbot/core/engine.py index f4c52a803..d8c58bfd8 100644 --- a/bbot/core/engine.py +++ b/bbot/core/engine.py @@ -641,7 +641,7 @@ async def finished_tasks(self, tasks, timeout=None): except BaseException as e: if isinstance(e, (TimeoutError, asyncio.exceptions.TimeoutError)): self.log.warning(f"{self.name}: Timeout after {timeout:,} seconds in finished_tasks({tasks})") - for task in tasks: + for task in list(tasks): task.cancel() self._await_cancelled_task(task) else: @@ -683,5 +683,5 @@ async def cancel_all_tasks(self): for client_id in list(self.tasks): await self.cancel_task(client_id) for client_id, tasks in self.child_tasks.items(): - for task in tasks: + for task in list(tasks): await self._await_cancelled_task(task) diff --git a/bbot/modules/baddns.py b/bbot/modules/baddns.py index 443606f7e..5e468b0d7 100644 --- a/bbot/modules/baddns.py +++ b/bbot/modules/baddns.py @@ -116,7 +116,7 @@ async def handle_event(self, event): context=f'{{module}}\'s "{r_dict["module"]}" module found {{event.type}}: {r_dict["description"]}', ) else: - self.warning(f"Got unrecognized confidence level: {r['confidence']}") + self.warning(f"Got unrecognized confidence level: {r_dict['confidence']}") found_domains = r_dict.get("found_domains", None) if found_domains: