mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-23 13:45:45 -05:00
config: make filepath the first argument for ConfigStateHolder
This commit is contained in:
parent
7f86c80cec
commit
7ca0e80682
1 changed files with 2 additions and 1 deletions
|
@ -278,7 +278,7 @@ class ConfigStateHolder:
|
|||
file_state: ConfigLoadState
|
||||
_profile_cache: dict[str, Profile]
|
||||
|
||||
def __init__(self, runtime_conf={}, file_conf_path: Optional[str] = None, file_conf_base: dict = {}):
|
||||
def __init__(self, file_conf_path: Optional[str] = None, runtime_conf={}, file_conf_base: dict = {}):
|
||||
"""init a stateholder, optionally loading `file_conf_path`"""
|
||||
self.file_state = ConfigLoadState()
|
||||
self.runtime = CONFIG_RUNTIME_DEFAULTS.copy()
|
||||
|
@ -299,6 +299,7 @@ class ConfigStateHolder:
|
|||
self.file_state.load_finished = True
|
||||
|
||||
def is_loaded(self) -> bool:
|
||||
"returns True if a file was **sucessfully** loaded"
|
||||
return self.file_state.load_finished and self.file_state.exception is None
|
||||
|
||||
def enforce_config_loaded(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue