diff options
| author | Sebastian Law <[email protected]> | 2021-02-28 20:54:44 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-02-28 23:54:44 -0500 |
| commit | f7a4bef4ff13689bc4168130edd582e7bcedac27 (patch) | |
| tree | b69968bd03b295d2c32d8fd082b834570e20c46d | |
| parent | Update docs for discord.Invite.max_uses (diff) | |
| download | discord.py-f7a4bef4ff13689bc4168130edd582e7bcedac27.tar.xz discord.py-f7a4bef4ff13689bc4168130edd582e7bcedac27.zip | |
[tasks] remove redundant condition in Loop.next_iteration
self._task is only None if the Loop has never been started before,
which means None should be returned always, regardless of how
many seconds was passed into the constructor
this didn't break anything before because self._next_iteration will
be None as well if self._task is None.
| -rw-r--r-- | discord/ext/tasks/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py index 9f687005..818f38ad 100644 --- a/discord/ext/tasks/__init__.py +++ b/discord/ext/tasks/__init__.py @@ -154,7 +154,7 @@ class Loop: .. versionadded:: 1.3 """ - if self._task is None and self._sleep: + if self._task is None: return None elif self._task and self._task.done() or self._stop_next_iteration: return None |