]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Silence PyYAML warning
authorMichał Kępień <michal@isc.org>
Thu, 23 Apr 2020 06:07:07 +0000 (08:07 +0200)
committerOndřej Surý <ondrej@isc.org>
Fri, 24 Apr 2020 14:11:20 +0000 (16:11 +0200)
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):

bin/tests/system/dnstap/ydump.py

index 6788b054b81bbbfe92056f6543684f7e18d0967c..e199effca4409f15664fe7f089fdde0543ebe131 100644 (file)
@@ -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)