Skip to content

Commit 661962a

Browse files
committed
Undo code changed by mistake.
1 parent 2078cc8 commit 661962a

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Lib/email/_header_value_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,12 +1366,12 @@ def get_word(value):
13661366
if value[0]=='"':
13671367
token, value = get_quoted_string(value)
13681368
elif value[0] in SPECIALS:
1369-
raise errors.HeaderParseError((value))
1369+
raise errors.HeaderParseError("Expected 'atom' or 'quoted-string' "
1370+
"but found '{}'".format(value))
13701371
else:
13711372
token, value = get_atom(value)
13721373
if leader is not None:
13731374
token[:0] = [leader]
1374-
13751375
return token, value
13761376

13771377
def get_phrase(value):
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Fix IndexError in parsing a header value with only comments in some headers.
2-
Patch by Abhilash Raj.
1+
Fix IndexError in parsing a header value ending unexpectedly. Patch by Abhilash
2+
Raj.

0 commit comments

Comments
 (0)