aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-06-24 16:46:14 -0700
committerGravatar MarkKoz <[email protected]>2020-06-24 16:46:14 -0700
commitbc6817536a7db4242cfa725ce809ced45f7cb556 (patch)
treee8665ec033f5619952178752ba1f9f507c351009
parentScheduler: close coroutine if task ID already exists (diff)
Scheduler: remove duplicate dict delete
The task is already popped from the dict, so there is no need to delete it afterwards.
-rw-r--r--bot/utils/scheduling.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/bot/utils/scheduling.py b/bot/utils/scheduling.py
index 4e99db76c..4110598d5 100644
--- a/bot/utils/scheduling.py
+++ b/bot/utils/scheduling.py
@@ -64,7 +64,6 @@ class Scheduler:
except KeyError:
self._log.warning(f"Failed to unschedule {task_id} (no task found).")
else:
- del self._scheduled_tasks[task_id]
task.cancel()
self._log.debug(f"Unscheduled task #{task_id} {id(task)}.")