Skip to content

Commit

Permalink
Fix exception-raising for user db
Browse files Browse the repository at this point in the history
  • Loading branch information
hmpf committed Jan 19, 2024
1 parent 9e89438 commit f9d7aef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/howitz/users/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


class UserDB:
class Exception(Exception):
class DBException(Exception):
pass

def __init__(self, database_file: str):
Expand Down Expand Up @@ -54,7 +54,7 @@ def get(self, username, connection=None):
if not result:
return None
if len(result) > 1:
raise Exception("More than one with that username, b0rked database")
raise self.DBException("More than one with that username, b0rked database")
return result[0]

def add(self, user: User):
Expand Down

0 comments on commit f9d7aef

Please sign in to comment.