mirror of
https://github.com/clearml/clearml
synced 2025-01-31 09:07:00 +00:00
Support raising ConfigurationError when checking for min API version (makes sure a proper error is raised when importing clearml while using an invalid configuration)
This commit is contained in:
parent
73e2ecf7fd
commit
07dcbcac08
@ -38,6 +38,7 @@ from .defs import (
|
|||||||
from .request import Request, BatchRequest # noqa: F401
|
from .request import Request, BatchRequest # noqa: F401
|
||||||
from .token_manager import TokenManager
|
from .token_manager import TokenManager
|
||||||
from ..utils import get_http_session_with_retry, urllib_log_warning_setup
|
from ..utils import get_http_session_with_retry, urllib_log_warning_setup
|
||||||
|
from ...backend_config import ConfigurationError
|
||||||
from ...backend_config.defs import get_config_file
|
from ...backend_config.defs import get_config_file
|
||||||
from ...debugging import get_logger
|
from ...debugging import get_logger
|
||||||
from ...debugging.log import resolve_logging_level
|
from ...debugging.log import resolve_logging_level
|
||||||
@ -773,7 +774,7 @@ class Session(TokenManager):
|
|||||||
# noinspection PyBroadException
|
# noinspection PyBroadException
|
||||||
try:
|
try:
|
||||||
cls()
|
cls()
|
||||||
except MissingConfigError:
|
except (MissingConfigError, ConfigurationError):
|
||||||
if raise_error and not ENV_IGNORE_MISSING_CONFIG.get():
|
if raise_error and not ENV_IGNORE_MISSING_CONFIG.get():
|
||||||
raise
|
raise
|
||||||
except LoginError:
|
except LoginError:
|
||||||
|
Loading…
Reference in New Issue
Block a user