Fix YAMLLoadWarning
Calling yaml.load() without Loader=... is deprecated Change-Id: Iaff10677a452937c312a9249e229f49929544faa Signed-off-by: Cédric Ollivier <ollivier.cedric@gmail.com>
This commit is contained in:
parent
c54ab8f629
commit
a8269684ff
@ -30,7 +30,7 @@ def config_loads(cfg_text, from_cfg=None):
|
||||
'''Same as config_load but load from a string
|
||||
'''
|
||||
try:
|
||||
cfg = AttrDict(yaml.load(cfg_text))
|
||||
cfg = AttrDict(yaml.safe_load(cfg_text))
|
||||
except TypeError:
|
||||
# empty string
|
||||
cfg = AttrDict()
|
||||
|
Loading…
Reference in New Issue
Block a user