mirror of
https://github.com/Garmelon/PFERD.git
synced 2026-04-12 15:35:05 +02:00
Clean up authenticator exceptions
- Renamed to *Error for consistency - Treating AuthError like CrawlError
This commit is contained in:
parent
c15a1aecdf
commit
22c2259adb
6 changed files with 19 additions and 19 deletions
|
|
@ -4,11 +4,11 @@ from typing import Tuple
|
|||
from ..config import Config, Section
|
||||
|
||||
|
||||
class AuthLoadException(Exception):
|
||||
class AuthLoadError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class AuthException(Exception):
|
||||
class AuthError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ class Authenticator(ABC):
|
|||
If you are writing your own constructor for your own authenticator,
|
||||
make sure to call this constructor first (via super().__init__).
|
||||
|
||||
May throw an AuthLoadException.
|
||||
May throw an AuthLoadError.
|
||||
"""
|
||||
|
||||
self.name = name
|
||||
|
|
@ -56,7 +56,7 @@ class Authenticator(ABC):
|
|||
(e. g. prompting the user).
|
||||
"""
|
||||
|
||||
raise AuthException("Invalid credentials")
|
||||
raise AuthError("Invalid credentials")
|
||||
|
||||
def invalidate_username(self) -> None:
|
||||
"""
|
||||
|
|
@ -67,7 +67,7 @@ class Authenticator(ABC):
|
|||
(e. g. prompting the user).
|
||||
"""
|
||||
|
||||
raise AuthException("Invalid username")
|
||||
raise AuthError("Invalid username")
|
||||
|
||||
def invalidate_password(self) -> None:
|
||||
"""
|
||||
|
|
@ -78,4 +78,4 @@ class Authenticator(ABC):
|
|||
(e. g. prompting the user).
|
||||
"""
|
||||
|
||||
raise AuthException("Invalid password")
|
||||
raise AuthError("Invalid password")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue