summaryrefslogtreecommitdiff
path: root/jwt/algorithms.py
diff options
context:
space:
mode:
Diffstat (limited to 'jwt/algorithms.py')
-rw-r--r--jwt/algorithms.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/jwt/algorithms.py b/jwt/algorithms.py
index cf3bd47..89ea75b 100644
--- a/jwt/algorithms.py
+++ b/jwt/algorithms.py
@@ -82,7 +82,7 @@ class HMACAlgorithm(Algorithm):
self.hash_alg = hash_alg
def prepare_key(self, key):
- if not isinstance(key, string_types) and not isinstance(key, text_type):
+ if not isinstance(key, string_types) and not isinstance(key, bytes):
raise TypeError('Expecting a string- or bytes-formatted key.')
if isinstance(key, text_type):