more bugfixes
This commit is contained in:
parent
fa570617d7
commit
b5e5664cbc
@ -106,7 +106,7 @@ class Slate():
|
||||
def deep_expand_vars(self, dict, **kwargs):
|
||||
self.apply_nested(dict, lambda x: self.expand_vars(x, **kwargs))
|
||||
|
||||
def consume(self, conf, key, default=None, **kwargs):
|
||||
def consume(self, conf, key, default=None, expand=False, **kwargs):
|
||||
keys_arr = key.split('.')
|
||||
if len(keys_arr) == 1:
|
||||
k = keys_arr[0]
|
||||
@ -117,7 +117,9 @@ class Slate():
|
||||
if k in conf:
|
||||
del conf[k]
|
||||
|
||||
if type(val) == str:
|
||||
if expand:
|
||||
self.deep_expand_vars(val, config=self._config, **kwargs)
|
||||
elif type(val) == str:
|
||||
while val.find('{') != -1:
|
||||
val = self.expand_vars(val, config=self._config, **kwargs)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user