summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/contentmanager.py6
-rw-r--r--Lib/email/generator.py2
-rw-r--r--Lib/email/header.py4
-rw-r--r--Lib/email/message.py2
4 files changed, 7 insertions, 7 deletions
diff --git a/Lib/email/contentmanager.py b/Lib/email/contentmanager.py
index d363652..099c314 100644
--- a/Lib/email/contentmanager.py
+++ b/Lib/email/contentmanager.py
@@ -141,7 +141,7 @@ def _encode_base64(data, max_line_length):
def _encode_text(string, charset, cte, policy):
lines = string.encode(charset).splitlines()
linesep = policy.linesep.encode('ascii')
- def embeded_body(lines): return linesep.join(lines) + linesep
+ def embedded_body(lines): return linesep.join(lines) + linesep
def normal_body(lines): return b'\n'.join(lines) + b'\n'
if cte==None:
# Use heuristics to decide on the "best" encoding.
@@ -152,7 +152,7 @@ def _encode_text(string, charset, cte, policy):
if (policy.cte_type == '8bit' and
max(len(x) for x in lines) <= policy.max_line_length):
return '8bit', normal_body(lines).decode('ascii', 'surrogateescape')
- sniff = embeded_body(lines[:10])
+ sniff = embedded_body(lines[:10])
sniff_qp = quoprimime.body_encode(sniff.decode('latin-1'),
policy.max_line_length)
sniff_base64 = binascii.b2a_base64(sniff)
@@ -171,7 +171,7 @@ def _encode_text(string, charset, cte, policy):
data = quoprimime.body_encode(normal_body(lines).decode('latin-1'),
policy.max_line_length)
elif cte == 'base64':
- data = _encode_base64(embeded_body(lines), policy.max_line_length)
+ data = _encode_base64(embedded_body(lines), policy.max_line_length)
else:
raise ValueError("Unknown content transfer encoding {}".format(cte))
return cte, data
diff --git a/Lib/email/generator.py b/Lib/email/generator.py
index 11ff16d..7c3cdc9 100644
--- a/Lib/email/generator.py
+++ b/Lib/email/generator.py
@@ -97,7 +97,7 @@ class Generator:
self._NL = policy.linesep
self._encoded_NL = self._encode(self._NL)
self._EMPTY = ''
- self._encoded_EMTPY = self._encode('')
+ self._encoded_EMPTY = self._encode('')
# Because we use clone (below) when we recursively process message
# subparts, and because clone uses the computed policy (not None),
# submessages will automatically get set to the computed policy when
diff --git a/Lib/email/header.py b/Lib/email/header.py
index 6820ea1..c7b2dd9 100644
--- a/Lib/email/header.py
+++ b/Lib/email/header.py
@@ -49,7 +49,7 @@ fcre = re.compile(r'[\041-\176]+:$')
# Find a header embedded in a putative header value. Used to check for
# header injection attack.
-_embeded_header = re.compile(r'\n[^ \t]+:')
+_embedded_header = re.compile(r'\n[^ \t]+:')
@@ -385,7 +385,7 @@ class Header:
if self._chunks:
formatter.add_transition()
value = formatter._str(linesep)
- if _embeded_header.search(value):
+ if _embedded_header.search(value):
raise HeaderParseError("header value appears to contain "
"an embedded header: {!r}".format(value))
return value
diff --git a/Lib/email/message.py b/Lib/email/message.py
index 6cd6cb7..4b04283 100644
--- a/Lib/email/message.py
+++ b/Lib/email/message.py
@@ -1043,7 +1043,7 @@ class MIMEPart(Message):
yield from parts
return
# Otherwise we more or less invert the remaining logic in get_body.
- # This only really works in edge cases (ex: non-text relateds or
+ # This only really works in edge cases (ex: non-text related or
# alternatives) if the sending agent sets content-disposition.
seen = [] # Only skip the first example of each candidate type.
for part in parts: