summaryrefslogtreecommitdiff
path: root/Lib/email
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-12-21 12:59:28 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2016-12-21 12:59:28 +0200
commit8cbd3df3ce75699cdc64d0d1bd903af43da43fa0 (patch)
treee23173f5414db6ab26f925cc1824c2c6890c6723 /Lib/email
parent47bdc40352b06cc28ed91c988dbd65bb3b298471 (diff)
downloadcpython-git-8cbd3df3ce75699cdc64d0d1bd903af43da43fa0.tar.gz
Issue #28992: Use bytes.fromhex().
Diffstat (limited to 'Lib/email')
-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 5eaab36ed0..32a1fa2648 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([int(m.group(1), 16)]))
+ lambda m: bytes.fromhex(m.group(1)))
def decode_q(encoded):
encoded = encoded.replace(b'_', b' ')