Fix loading META.yml on Py35
This commit is contained in:
parent
29765b0adc
commit
27a0eb47eb
@ -116,7 +116,7 @@ def check_element(field, element, props, metafile):
|
|||||||
for directory in glob.iglob('crypto_*/*/'):
|
for directory in glob.iglob('crypto_*/*/'):
|
||||||
metafile = os.path.join(directory, 'META.yml')
|
metafile = os.path.join(directory, 'META.yml')
|
||||||
try:
|
try:
|
||||||
with open(metafile) as f:
|
with open(metafile, encoding='utf-8') as f:
|
||||||
metadata = yaml.load(f.read())
|
metadata = yaml.load(f.read())
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
eprint("Can't open {}: {}".format(metafile, e))
|
eprint("Can't open {}: {}".format(metafile, e))
|
||||||
|
@ -19,7 +19,7 @@ SCHEMESHORT = SCHEME.split('/')[1].upper()
|
|||||||
|
|
||||||
|
|
||||||
def get_hash(scheme):
|
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)
|
meta = yaml.load(stream)
|
||||||
return meta['testvectors-sha256']
|
return meta['testvectors-sha256']
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user