summaryrefslogtreecommitdiffstats
path: root/Lib/email/_encoded_words.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-12-21 12:08:55 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-12-21 12:08:55 (GMT)
commit3d42225e3d87fea830b43de781ca8cfa0dd0fcea (patch)
tree25e32045996541009a9804feea9ace89527e367f /Lib/email/_encoded_words.py
parent3bfa1ed74d8bbdd2b811500fa2c6ad84c5f116df (diff)
downloadcpython-3d42225e3d87fea830b43de781ca8cfa0dd0fcea.zip
cpython-3d42225e3d87fea830b43de781ca8cfa0dd0fcea.tar.gz
cpython-3d42225e3d87fea830b43de781ca8cfa0dd0fcea.tar.bz2
Fixed a type error introduced in issue #28992.
Diffstat (limited to 'Lib/email/_encoded_words.py')
-rw-r--r--Lib/email/_encoded_words.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/email/_encoded_words.py b/Lib/email/_encoded_words.py
index 32a1fa2..c40ffa9 100644
--- a/Lib/email/_encoded_words.py
+++ b/Lib/email/_encoded_words.py
@@ -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' ')