mirror of
https://github.com/henrydcase/pqc.git
synced 2024-11-22 23:48:58 +00:00
use yaml.safe_load to silence warning.
This commit is contained in:
parent
ee680f218b
commit
98780c6e8e
@ -55,7 +55,7 @@ class Scheme:
|
|||||||
metafile = os.path.join(self.path(), 'META.yml')
|
metafile = os.path.join(self.path(), 'META.yml')
|
||||||
try:
|
try:
|
||||||
with open(metafile, encoding='utf-8') as f:
|
with open(metafile, encoding='utf-8') as f:
|
||||||
metadata = yaml.load(f.read())
|
metadata = yaml.safe_load(f.read())
|
||||||
return metadata
|
return metadata
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Can't open {}: {}".format(metafile, e))
|
print("Can't open {}: {}".format(metafile, e))
|
||||||
|
@ -16,7 +16,7 @@ def test_duplicate_consistency():
|
|||||||
if os.path.isfile(os.path.join('duplicate_consistency', '{}_{}.yml'.format(scheme.name, implementation.name))):
|
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))
|
metafile = os.path.join('duplicate_consistency', '{}_{}.yml'.format(implementation.scheme.name, implementation.name))
|
||||||
with open(metafile, encoding='utf-8') as f:
|
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']:
|
for group in metadata['consistency_checks']:
|
||||||
source = pqclean.Implementation.by_name(group['source']['scheme'], group['source']['implementation'])
|
source = pqclean.Implementation.by_name(group['source']['scheme'], group['source']['implementation'])
|
||||||
for file in group['files']:
|
for file in group['files']:
|
||||||
|
Loading…
Reference in New Issue
Block a user