From a8269684ff146f467f904e4decdd6693acf003a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Ollivier?= Date: Sun, 19 May 2019 19:15:41 +0200 Subject: [PATCH] Fix YAMLLoadWarning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Calling yaml.load() without Loader=... is deprecated Change-Id: Iaff10677a452937c312a9249e229f49929544faa Signed-off-by: Cédric Ollivier --- vmtp/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmtp/config.py b/vmtp/config.py index ee49e61..41eb2b1 100644 --- a/vmtp/config.py +++ b/vmtp/config.py @@ -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()