aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/christmas/advent_of_code
diff options
context:
space:
mode:
authorGravatar Matteo Bertucci <[email protected]>2021-08-09 16:45:45 +0200
committerGravatar GitHub <[email protected]>2021-08-09 16:45:45 +0200
commit67caea1f737f86c2394cc9a280acbfe71588c917 (patch)
tree8c4da29580d176964679a1b73e46ffc8b5e64215 /bot/exts/christmas/advent_of_code
parentMerge #804 - circumvent URL injections in various cogs (diff)
parentMerge branch 'main' into remove-gpl-deps (diff)
Merge pull request #799 from python-discord/remove-gpl-deps
Remove gpl deps
Diffstat (limited to 'bot/exts/christmas/advent_of_code')
-rw-r--r--bot/exts/christmas/advent_of_code/_helpers.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/exts/christmas/advent_of_code/_helpers.py b/bot/exts/christmas/advent_of_code/_helpers.py
index 96de90c4..e26a17ca 100644
--- a/bot/exts/christmas/advent_of_code/_helpers.py
+++ b/bot/exts/christmas/advent_of_code/_helpers.py
@@ -67,7 +67,7 @@ class UnexpectedResponseStatus(aiohttp.ClientError):
"""Raised when an unexpected redirect was detected."""
-class FetchingLeaderboardFailed(Exception):
+class FetchingLeaderboardFailedError(Exception):
"""Raised when one or more leaderboards could not be fetched at all."""
@@ -210,7 +210,7 @@ async def _fetch_leaderboard_data() -> typing.Dict[str, typing.Any]:
except UnexpectedRedirect:
if cookies["session"] == AdventOfCode.fallback_session:
log.error("It seems like the fallback cookie has expired!")
- raise FetchingLeaderboardFailed from None
+ raise FetchingLeaderboardFailedError from None
# If we're here, it means that the original session did not
# work. Let's fall back to the fallback session.
@@ -218,7 +218,7 @@ async def _fetch_leaderboard_data() -> typing.Dict[str, typing.Any]:
continue
except aiohttp.ClientError:
# Don't retry, something unexpected is wrong and it may not be the session.
- raise FetchingLeaderboardFailed from None
+ raise FetchingLeaderboardFailedError from None
else:
# Get the participants and store their current count.
board_participants = raw_data["members"]
@@ -227,7 +227,7 @@ async def _fetch_leaderboard_data() -> typing.Dict[str, typing.Any]:
break
else:
log.error(f"reached 'unreachable' state while fetching board `{leaderboard.id}`.")
- raise FetchingLeaderboardFailed
+ raise FetchingLeaderboardFailedError
log.info(f"Fetched leaderboard information for {len(participants)} participants")
return participants