diff --git a/PFERD/__main__.py b/PFERD/__main__.py index 1cca8b1..5ae62bb 100644 --- a/PFERD/__main__.py +++ b/PFERD/__main__.py @@ -5,6 +5,7 @@ import os import sys from pathlib import Path +from .auth import AuthLoadError from .cli import PARSER, ParserLoadError, load_default_section from .config import Config, ConfigDumpError, ConfigLoadError, ConfigOptionError from .logging import log @@ -134,7 +135,7 @@ def main() -> None: loop.close() else: asyncio.run(pferd.run(args.debug_transforms)) - except ConfigOptionError as e: + except (ConfigOptionError, AuthLoadError) as e: log.unlock() log.error(str(e)) sys.exit(1) diff --git a/PFERD/auth/__init__.py b/PFERD/auth/__init__.py index eff8370..06b3ba4 100644 --- a/PFERD/auth/__init__.py +++ b/PFERD/auth/__init__.py @@ -2,7 +2,7 @@ from configparser import SectionProxy from typing import Callable, Dict from ..config import Config -from .authenticator import Authenticator, AuthError, AuthSection # noqa: F401 +from .authenticator import Authenticator, AuthError, AuthLoadError, AuthSection # noqa: F401 from .credential_file import CredentialFileAuthenticator, CredentialFileAuthSection from .keyring import KeyringAuthenticator, KeyringAuthSection from .simple import SimpleAuthenticator, SimpleAuthSection