From: Kefu Chai Date: Wed, 17 Jun 2020 08:48:15 +0000 (+0800) Subject: nuke: s/yaml.load/yaml.safe_load/ X-Git-Tag: 1.1.0~87^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a825409240e2bd549e655c890985469513ba4bde;p=teuthology.git 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 --- 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: