mirror of
https://github.com/kevinveenbirkenbach/homepage.veen.world.git
synced 2025-04-22 13:12:25 +02:00
Added exception for debugging
This commit is contained in:
parent
3ec92ff853
commit
a0c7a7e8ca
@ -114,8 +114,14 @@ class ConfigurationResolver:
|
|||||||
key = next((k for k in current if self._mapped_key(k) == part), None)
|
key = next((k for k in current if self._mapped_key(k) == part), None)
|
||||||
# If no fitting key was found search in the children
|
# If no fitting key was found search in the children
|
||||||
if key is None:
|
if key is None:
|
||||||
|
if "children" not in current:
|
||||||
|
raise KeyError(
|
||||||
|
f"No 'children' found in current dictionary. Path so far: {' > '.join(parts[:parts.index(part)+1])}. "
|
||||||
|
f"Current dictionary: {current}"
|
||||||
|
)
|
||||||
# The following line seems buggy; Why is children loaded allways and not just when children is set?
|
# The following line seems buggy; Why is children loaded allways and not just when children is set?
|
||||||
current = self._find_by_name(current["children"],part)
|
current = self._find_by_name(current["children"],part)
|
||||||
|
|
||||||
if not current:
|
if not current:
|
||||||
raise KeyError(
|
raise KeyError(
|
||||||
f"Key '{part}' not found in dictionary. Path so far: {' > '.join(parts[:parts.index(part)+1])}. "
|
f"Key '{part}' not found in dictionary. Path so far: {' > '.join(parts[:parts.index(part)+1])}. "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user