Skip to content
This repository was archived by the owner on Jun 23, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/oidcop/session/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ class NoSuchGrant(KeyError):
pass


class InconsistentDatabase(TypeError):
pass


class Database(ImpExp):
parameter = {
"db": DLDict,
Expand Down Expand Up @@ -91,6 +95,8 @@ def get(self, path: List[str]) -> Union[SessionInfo, Grant]:
user_info = self.db[uid]
except KeyError:
raise KeyError('No such UserID')
except TypeError:
raise InconsistentDatabase('Missing session db')
else:
if user_info is None:
raise KeyError('No such UserID')
Expand Down