From: Michał Kępień Date: Thu, 23 Apr 2020 06:07:07 +0000 (+0200) Subject: Silence PyYAML warning X-Git-Tag: v9.17.2~121^2~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba0e9cb56c66e26793d7c23614f4fc3d3f10ff98;p=thirdparty%2Fbind9.git Silence PyYAML warning Make yaml.load_all() use yaml.SafeLoader to address a warning currently emitted when bin/tests/system/dnstap/ydump.py is run: ydump.py:28: YAMLLoadWarning: calling yaml.load_all() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. for l in yaml.load_all(f.stdout): --- diff --git a/bin/tests/system/dnstap/ydump.py b/bin/tests/system/dnstap/ydump.py index 6788b054b81..e199effca44 100644 --- a/bin/tests/system/dnstap/ydump.py +++ b/bin/tests/system/dnstap/ydump.py @@ -25,5 +25,5 @@ DATAFILE = sys.argv[2] ARGS = [DNSTAP_READ, '-y', DATAFILE] with subprocess.Popen(ARGS, stdout=subprocess.PIPE) as f: - for l in yaml.load_all(f.stdout): + for l in yaml.load_all(f.stdout, Loader=yaml.SafeLoader): pprint.pprint(l)