diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-10-23 09:41:49 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-10-28 17:34:37 -0500 |
commit | 00dd509f180b6229cfd4b913274a94df3bc05a00 (patch) | |
tree | 1901c5c6d715b34a36f5b7c1e54f4c952c51d31a /tests | |
parent | 6122d129e97efc49390bd2c41f644b85b1056cce (diff) | |
download | cryptography-00dd509f180b6229cfd4b913274a94df3bc05a00.tar.gz cryptography-00dd509f180b6229cfd4b913274a94df3bc05a00.tar.bz2 cryptography-00dd509f180b6229cfd4b913274a94df3bc05a00.zip |
address initial review comments
Diffstat (limited to 'tests')
-rw-r--r-- | tests/utils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/utils.py b/tests/utils.py index a97cdf7a..25291d55 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -127,6 +127,7 @@ def load_openssl_vectors(vector_data): def load_hash_vectors(vector_data): vectors = [] + key, msg, md = None, None, None for line in vector_data: line = line.strip() @@ -151,9 +152,9 @@ def load_hash_vectors(vector_data): elif line.startswith("MD"): md = line.split(" = ")[1] # after MD is found the Msg+MD (+ potential key) tuple is complete - try: + if key is not None: vectors.append((msg, md, key)) - except: + else: vectors.append((msg, md)) else: raise ValueError("Unknown line in hash vector") |