get(): do not store default value in tree if key is not found
This commit is contained in:
parent
d8d9eaef60
commit
1a09a5d43d
1 changed files with 1 additions and 2 deletions
|
|
@ -79,8 +79,7 @@ class YamlConfig(IConfig):
|
||||||
try:
|
try:
|
||||||
v = v[args[-1]]
|
v = v[args[-1]]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
v[args[-1]] = default
|
v = default
|
||||||
v = v[args[-1]]
|
|
||||||
|
|
||||||
return v
|
return v
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue