summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/email/quoprimime.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/email/quoprimime.py b/Lib/email/quoprimime.py
index 01de769..1301e0b 100644
--- a/Lib/email/quoprimime.py
+++ b/Lib/email/quoprimime.py
@@ -58,7 +58,7 @@ _QUOPRI_HEADER_MAP = dict((c, '=%02X' % c) for c in range(256))
_QUOPRI_BODY_MAP = _QUOPRI_HEADER_MAP.copy()
# Safe header bytes which need no encoding.
-for c in b'-!*+/' + bytes(ascii_letters) + bytes(digits):
+for c in b'-!*+/' + bytes(ascii_letters, 'ascii') + bytes(digits, 'ascii'):
_QUOPRI_HEADER_MAP[c] = chr(c)
# Headers have one other special encoding; spaces become underscores.
_QUOPRI_HEADER_MAP[ord(' ')] = '_'