From 98780c6e8e7903eb81396ab5259e4c6e289deb25 Mon Sep 17 00:00:00 2001 From: Thom Wiggers Date: Thu, 18 Apr 2019 09:26:40 +0200 Subject: [PATCH] use yaml.safe_load to silence warning. --- test/pqclean.py | 2 +- test/test_duplicate_consistency.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/pqclean.py b/test/pqclean.py index 2555b4e0..004a4600 100644 --- a/test/pqclean.py +++ b/test/pqclean.py @@ -55,7 +55,7 @@ class Scheme: metafile = os.path.join(self.path(), 'META.yml') try: with open(metafile, encoding='utf-8') as f: - metadata = yaml.load(f.read()) + metadata = yaml.safe_load(f.read()) return metadata except Exception as e: print("Can't open {}: {}".format(metafile, e)) diff --git a/test/test_duplicate_consistency.py b/test/test_duplicate_consistency.py index 306d2bed..2f86b74a 100644 --- a/test/test_duplicate_consistency.py +++ b/test/test_duplicate_consistency.py @@ -16,7 +16,7 @@ def test_duplicate_consistency(): if os.path.isfile(os.path.join('duplicate_consistency', '{}_{}.yml'.format(scheme.name, implementation.name))): metafile = os.path.join('duplicate_consistency', '{}_{}.yml'.format(implementation.scheme.name, implementation.name)) with open(metafile, encoding='utf-8') as f: - metadata = yaml.load(f.read()) + metadata = yaml.safe_load(f.read()) for group in metadata['consistency_checks']: source = pqclean.Implementation.by_name(group['source']['scheme'], group['source']['implementation']) for file in group['files']: