1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-22 07:35:38 +00:00

Fix loading META.yml on Py35

This commit is contained in:
Thom Wiggers 2019-02-11 14:48:16 +01:00
parent 29765b0adc
commit 27a0eb47eb
No known key found for this signature in database
GPG Key ID: 001BB0A7CE26E363
2 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ def check_element(field, element, props, metafile):
for directory in glob.iglob('crypto_*/*/'):
metafile = os.path.join(directory, 'META.yml')
try:
with open(metafile) as f:
with open(metafile, encoding='utf-8') as f:
metadata = yaml.load(f.read())
except Exception as e:
eprint("Can't open {}: {}".format(metafile, e))

View File

@ -19,7 +19,7 @@ SCHEMESHORT = SCHEME.split('/')[1].upper()
def get_hash(scheme):
with open("{}/META.yml".format(scheme), 'r') as stream:
with open("{}/META.yml".format(scheme), 'r', encoding='utf-8') as stream:
meta = yaml.load(stream)
return meta['testvectors-sha256']