mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-23 05:35:44 -05:00
config.py: fix config parsing warning and exception throwing
Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
This commit is contained in:
parent
3390014a9c
commit
8d1061004a
1 changed files with 3 additions and 4 deletions
|
@ -182,7 +182,7 @@ def merge_configs(conf_new: dict[str, dict], conf_base={}, warn_missing_defaultp
|
|||
# handle generic inner config dict
|
||||
for inner_name, inner_conf in outer_conf.items():
|
||||
if inner_name not in CONFIG_DEFAULTS[outer_name].keys():
|
||||
logging.warning(f'Skipped unknown config item "{key}" in "{inner_name}"')
|
||||
logging.warning(f'Skipped unknown config item "{inner_name}" in "{outer_name}"')
|
||||
continue
|
||||
parsed[outer_name][inner_name] = inner_conf
|
||||
|
||||
|
@ -274,10 +274,9 @@ class ConfigStateHolder:
|
|||
raise ConfigLoadException(Exception("Config file wasn't even parsed yet. This is probably a bug in kupferbootstrap :O"))
|
||||
ex = self.file_state.exception
|
||||
if ex:
|
||||
msg = ''
|
||||
if type(ex) == FileNotFoundError:
|
||||
msg = "File doesn't exist. Try running `kupferbootstrap config init` first?"
|
||||
raise ConfigLoadException(extra_msg=msg, inner_exception=ex)
|
||||
ex = Exception("File doesn't exist. Try running `kupferbootstrap config init` first?")
|
||||
raise ex
|
||||
|
||||
def get_profile(self, name: str = None) -> Profile:
|
||||
if not name:
|
||||
|
|
Loading…
Add table
Reference in a new issue