From a825409240e2bd549e655c890985469513ba4bde Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 17 Jun 2020 16:48:15 +0800 Subject: [PATCH] nuke: s/yaml.load/yaml.safe_load/ to silence following warning: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. Signed-off-by: Kefu Chai --- teuthology/nuke/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teuthology/nuke/__init__.py b/teuthology/nuke/__init__.py index e6d141ed83..7d05592772 100644 --- a/teuthology/nuke/__init__.py +++ b/teuthology/nuke/__init__.py @@ -185,7 +185,7 @@ def main(args): ifn = os.path.join(ctx.archive, 'info.yaml') if os.path.exists(ifn): with open(ifn, 'r') as fd: - info = yaml.load(fd.read()) + info = yaml.safe_load(fd.read()) if not ctx.pid: ctx.pid = info.get('pid') if not ctx.pid: -- 2.39.5