mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-20 18:06:08 -05:00
Fix an attribute error that can be raised in humanize_timedelta if seconds = 0 (#3231)
* Migrate Playlist to DB 3 TODO
1 Migrate Config to Schema 3 without playlists
and update get_playlist methods
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Revert "Migrate Playlist to DB 3 TODO 1 Migrate Config to Schema 3 without playlists and update get_playlist methods"
This reverts commit 4af33cff
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Allow removing tracks from queue by URL
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Words matter
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* *sigh*
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* chore
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Fix an attribute error that can be raised here is seconds = 0
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Fix an attribute error that can be raised here is seconds = 0
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* go away
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* *sigh*
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
This commit is contained in:
@@ -430,7 +430,7 @@ def humanize_timedelta(
|
||||
"""
|
||||
|
||||
try:
|
||||
obj = seconds or timedelta.total_seconds()
|
||||
obj = seconds if seconds is not None else timedelta.total_seconds()
|
||||
except AttributeError:
|
||||
raise ValueError("You must provide either a timedelta or a number of seconds")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user