mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Fix unexpected exception when credential file not found
This commit is contained in:
parent
722970a255
commit
f6b26f4ead
@ -5,6 +5,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
from .auth import AuthLoadError
|
||||||
from .cli import PARSER, ParserLoadError, load_default_section
|
from .cli import PARSER, ParserLoadError, load_default_section
|
||||||
from .config import Config, ConfigDumpError, ConfigLoadError, ConfigOptionError
|
from .config import Config, ConfigDumpError, ConfigLoadError, ConfigOptionError
|
||||||
from .logging import log
|
from .logging import log
|
||||||
@ -134,7 +135,7 @@ def main() -> None:
|
|||||||
loop.close()
|
loop.close()
|
||||||
else:
|
else:
|
||||||
asyncio.run(pferd.run(args.debug_transforms))
|
asyncio.run(pferd.run(args.debug_transforms))
|
||||||
except ConfigOptionError as e:
|
except (ConfigOptionError, AuthLoadError) as e:
|
||||||
log.unlock()
|
log.unlock()
|
||||||
log.error(str(e))
|
log.error(str(e))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@ -2,7 +2,7 @@ from configparser import SectionProxy
|
|||||||
from typing import Callable, Dict
|
from typing import Callable, Dict
|
||||||
|
|
||||||
from ..config import Config
|
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 .credential_file import CredentialFileAuthenticator, CredentialFileAuthSection
|
||||||
from .keyring import KeyringAuthenticator, KeyringAuthSection
|
from .keyring import KeyringAuthenticator, KeyringAuthSection
|
||||||
from .simple import SimpleAuthenticator, SimpleAuthSection
|
from .simple import SimpleAuthenticator, SimpleAuthSection
|
||||||
|
Loading…
Reference in New Issue
Block a user