From 9184da8145de36085f210fe4505040c5d59a14fb Mon Sep 17 00:00:00 2001 From: Bese Personal Date: Sat, 14 Dec 2019 23:34:09 +0100 Subject: [PATCH] Fixing small typos --- jose/jwk.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jose/jwk.py b/jose/jwk.py index 87f30b41..eee5e3cd 100644 --- a/jose/jwk.py +++ b/jose/jwk.py @@ -36,7 +36,7 @@ def get_key(algorithm): def register_key(algorithm, key_class): if not issubclass(key_class, Key): - raise TypeError("Key class not a subclass of jwk.Key") + raise TypeError("Key class is not a subclass of jwk.Key") ALGORITHMS.KEYS[algorithm] = key_class ALGORITHMS.SUPPORTED.add(algorithm) return True @@ -53,11 +53,11 @@ def construct(key_data, algorithm=None): algorithm = key_data.get('alg', None) if not algorithm: - raise JWKError('Unable to find a algorithm for key: %s' % key_data) + raise JWKError('Unable to find an algorithm for key: %s' % key_data) key_class = get_key(algorithm) if not key_class: - raise JWKError('Unable to find a algorithm for key: %s' % key_data) + raise JWKError('Unable to find an algorithm for key: %s' % key_data) return key_class(key_data, algorithm) @@ -119,7 +119,7 @@ def __init__(self, key, algorithm): def _process_jwk(self, jwk_dict): if not jwk_dict.get('kty') == 'oct': - raise JWKError("Incorrect key type. Expected: 'oct', Recieved: %s" % jwk_dict.get('kty')) + raise JWKError("Incorrect key type. Expected: 'oct', Received: %s" % jwk_dict.get('kty')) k = jwk_dict.get('k') k = k.encode('utf-8')