diff options
Diffstat (limited to 'jimbrella/database.py')
-rw-r--r-- | jimbrella/database.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/jimbrella/database.py b/jimbrella/database.py index ab945da..e43b8f2 100644 --- a/jimbrella/database.py +++ b/jimbrella/database.py @@ -190,7 +190,7 @@ class Database: umb["serial"] = int(umb["serial"]) umb_in_db = self._find_by_serial(umb["serial"]) if umb_in_db is None: - raise UmbrellaNotFoundError + raise UmbrellaNotFoundError(umb["serial"]) status = umb_in_db["status"] if "status" in umb and umb["status"]: @@ -261,7 +261,7 @@ class Database: """When a user has borrowed an umbrella.""" umb = self._find_by_serial(serial) if umb is None: - raise UmbrellaNotFoundError + raise UmbrellaNotFoundError(serial) elif umb["status"] != "available": raise UmbrellaStatusError umb["status"] = "lent" @@ -276,7 +276,7 @@ class Database: """When a user has returned an umbrella.""" umb = self._find_by_serial(serial) if umb is None: - raise UmbrellaNotFoundError + raise UmbrellaNotFoundError(serial) elif umb["status"] not in ("lent", "overdue"): raise UmbrellaStatusError umb["status"] = "available" @@ -289,7 +289,7 @@ class Database: """When an umbrella is overdue, change its status to "overdue".""" umb = self._find_by_serial(serial) if umb is None: - raise UmbrellaNotFoundError + raise UmbrellaNotFoundError(serial) elif umb["status"] != "lent": raise UmbrellaStatusError umb["status"] = "overdue" |