summaryrefslogtreecommitdiffstats
path: root/Lib/email/_header_value_parser.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2014-08-04 14:16:49 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2014-08-04 14:16:49 (GMT)
commitd577480197f7cc427ac75deaebae3106399a9cd3 (patch)
tree32c98a99131958f874d3c1836c9ef757fa4ac1e4 /Lib/email/_header_value_parser.py
parent591176e544dfeec4586e239d5d07c6420a650f2c (diff)
downloadcpython-d577480197f7cc427ac75deaebae3106399a9cd3.zip
cpython-d577480197f7cc427ac75deaebae3106399a9cd3.tar.gz
cpython-d577480197f7cc427ac75deaebae3106399a9cd3.tar.bz2
#20977: fix undefined name in the email module. Patch by Rose Ames.
Diffstat (limited to 'Lib/email/_header_value_parser.py')
-rw-r--r--Lib/email/_header_value_parser.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py
index 3dc5502..1806cac 100644
--- a/Lib/email/_header_value_parser.py
+++ b/Lib/email/_header_value_parser.py
@@ -2897,7 +2897,7 @@ def parse_content_disposition_header(value):
try:
token, value = get_token(value)
except errors.HeaderParseError:
- ctype.defects.append(errors.InvalidHeaderDefect(
+ disp_header.defects.append(errors.InvalidHeaderDefect(
"Expected content disposition but found {!r}".format(value)))
_find_mime_parameters(disp_header, value)
return disp_header
@@ -2928,8 +2928,8 @@ def parse_content_transfer_encoding_header(value):
try:
token, value = get_token(value)
except errors.HeaderParseError:
- ctype.defects.append(errors.InvalidHeaderDefect(
- "Expected content trnasfer encoding but found {!r}".format(value)))
+ cte_header.defects.append(errors.InvalidHeaderDefect(
+ "Expected content transfer encoding but found {!r}".format(value)))
else:
cte_header.append(token)
cte_header.cte = token.value.strip().lower()