Skip to content

Commit

Permalink
Remove unnecessary else statement
Browse files Browse the repository at this point in the history
  • Loading branch information
EvieePy committed Jun 24, 2024
1 parent 768bba1 commit 445a58e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions wavelink/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,13 @@ def __init__(
self._inactivity_wait: int | None = self._node._inactive_player_timeout

def _inactivity_task_callback(self, task: asyncio.Task[bool]) -> None:
cancelled: bool
cancelled: bool = False

try:
result: bool = task.result()
except asyncio.CancelledError:
cancelled = True
result = False
else:
cancelled = task.cancelled()

if cancelled or result is False:
logger.debug("Disregarding Inactivity Check Task <%s> as it was previously cancelled.", task.get_name())
Expand Down

0 comments on commit 445a58e

Please sign in to comment.