aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/models
diff options
context:
space:
mode:
authorGravatar ChrisJL <[email protected]>2021-09-24 21:34:46 +0100
committerGravatar GitHub <[email protected]>2021-09-24 21:34:46 +0100
commita17a323139d3fd99018bd33a8319b2ef7f43eb07 (patch)
treec1cabc6a12fe31d0ddcfd36ba9b1e86cd4df7ed3 /pydis_site/apps/api/models
parentCorrect typos and spacing (diff)
parentMerge pull request #592 from python-discord/Relock-poetry (diff)
Merge branch 'main' into cj-wrapup
Diffstat (limited to 'pydis_site/apps/api/models')
-rw-r--r--pydis_site/apps/api/models/bot/metricity.py10
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