From 27a0eb47eb2492724189e952fd3bfc2356dcdd51 Mon Sep 17 00:00:00 2001 From: Thom Wiggers Date: Mon, 11 Feb 2019 14:48:16 +0100 Subject: [PATCH] Fix loading META.yml on Py35 --- test/check_metadata.py | 2 +- test/check_testvectors.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/check_metadata.py b/test/check_metadata.py index be759e99..b6b82042 100644 --- a/test/check_metadata.py +++ b/test/check_metadata.py @@ -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)) diff --git a/test/check_testvectors.py b/test/check_testvectors.py index 425a0aad..54dedb61 100644 --- a/test/check_testvectors.py +++ b/test/check_testvectors.py @@ -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']