lib: fix config possibly iterating None
This commit is contained in:
parent
7334599efd
commit
bd25cadb71
|
@ -136,7 +136,7 @@ class ConfigLoader:
|
||||||
root = root.get(sub, None)
|
root = root.get(sub, None)
|
||||||
# Walk each component of the path
|
# Walk each component of the path
|
||||||
for comp in path.split(sep):
|
for comp in path.split(sep):
|
||||||
if comp in root:
|
if root and comp in root:
|
||||||
root = root.get(comp)
|
root = root.get(comp)
|
||||||
else:
|
else:
|
||||||
return default
|
return default
|
||||||
|
|
Reference in New Issue