aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/email
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/contentmanager.py3
-rw-r--r--Lib/email/quoprimime.py1
2 files changed, 4 insertions, 0 deletions
diff --git a/Lib/email/contentmanager.py b/Lib/email/contentmanager.py
index fcf278dbccb..b4f5830bead 100644
--- a/Lib/email/contentmanager.py
+++ b/Lib/email/contentmanager.py
@@ -72,12 +72,14 @@ def get_non_text_content(msg):
return msg.get_payload(decode=True)
for maintype in 'audio image video application'.split():
raw_data_manager.add_get_handler(maintype, get_non_text_content)
+del maintype
def get_message_content(msg):
return msg.get_payload(0)
for subtype in 'rfc822 external-body'.split():
raw_data_manager.add_get_handler('message/'+subtype, get_message_content)
+del subtype
def get_and_fixup_unknown_message_content(msg):
@@ -246,3 +248,4 @@ def set_bytes_content(msg, data, maintype, subtype, cte='base64',
_finalize_set(msg, disposition, filename, cid, params)
for typ in (bytes, bytearray, memoryview):
raw_data_manager.add_set_handler(typ, set_bytes_content)
+del typ
diff --git a/Lib/email/quoprimime.py b/Lib/email/quoprimime.py
index 94534f7ee1e..27fcbb5a26e 100644
--- a/Lib/email/quoprimime.py
+++ b/Lib/email/quoprimime.py
@@ -148,6 +148,7 @@ def header_encode(header_bytes, charset='iso-8859-1'):
_QUOPRI_BODY_ENCODE_MAP = _QUOPRI_BODY_MAP[:]
for c in b'\r\n':
_QUOPRI_BODY_ENCODE_MAP[c] = chr(c)
+del c
def body_encode(body, maxlinelen=76, eol=NL):
"""Encode with quoted-printable, wrapping at maxlinelen characters.