]> granicus.if.org Git - python/commitdiff
Fixed a type error introduced in issue #28992.
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 21 Dec 2016 12:08:55 +0000 (14:08 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Wed, 21 Dec 2016 12:08:55 +0000 (14:08 +0200)
Lib/email/_encoded_words.py

index 32a1fa26483ef9ea06f7367ab7e11a5b6c494c00..c40ffa917b56c2c3a5ca129450add75ba52959c9 100644 (file)
@@ -62,7 +62,7 @@ __all__ = ['decode_q',
 
 # regex based decoder.
 _q_byte_subber = functools.partial(re.compile(br'=([a-fA-F0-9]{2})').sub,
-        lambda m: bytes.fromhex(m.group(1)))
+        lambda m: bytes.fromhex(m.group(1).decode()))
 
 def decode_q(encoded):
     encoded = encoded.replace(b'_', b' ')