diff options
author | 2021-09-22 12:31:48 +0200 | |
---|---|---|
committer | 2021-09-22 12:31:48 +0200 | |
commit | 5162e8dd7b45d4a40db7082c8c4a7af35852e731 (patch) | |
tree | e2e109110c7c949f86e01a9df7eb6863ba992aa4 /pydis_site/apps/api/models | |
parent | Merge pull request #588 from python-discord/revert-metricity-init-changes (diff) | |
parent | Rename an error to have a correct error suffix (diff) |
Merge pull request #592 from python-discord/Relock-poetry
Relock poetry
Diffstat (limited to 'pydis_site/apps/api/models')
-rw-r--r-- | pydis_site/apps/api/models/bot/metricity.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pydis_site/apps/api/models/bot/metricity.py b/pydis_site/apps/api/models/bot/metricity.py index 5daa5c66..33fb7ad7 100644 --- a/pydis_site/apps/api/models/bot/metricity.py +++ b/pydis_site/apps/api/models/bot/metricity.py @@ -10,7 +10,7 @@ EXCLUDE_CHANNELS = [ ] -class NotFound(Exception): +class NotFoundError(Exception): """Raised when an entity cannot be found.""" pass @@ -37,7 +37,7 @@ class Metricity: values = self.cursor.fetchone() if not values: - raise NotFound() + raise NotFoundError() return dict(zip(columns, values)) @@ -58,7 +58,7 @@ class Metricity: values = self.cursor.fetchone() if not values: - raise NotFound() + raise NotFoundError() return values[0] @@ -88,7 +88,7 @@ class Metricity: values = self.cursor.fetchone() if not values: - raise NotFound() + raise NotFoundError() return values[0] @@ -127,6 +127,6 @@ class Metricity: values = self.cursor.fetchall() if not values: - raise NotFound() + raise NotFoundError() return values |