Skip to content

Commit 619b19f

Browse files
committed
Fix the bug.
1 parent 1b0fbe2 commit 619b19f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/email/_header_value_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,11 +639,11 @@ def local_part(self):
639639
for tok in self[0] + [DOT]:
640640
if tok.token_type == 'cfws':
641641
continue
642-
if (last_is_tl and tok.token_type == 'dot' and
642+
if (last_is_tl and tok.token_type == 'dot' and last and
643643
last[-1].token_type == 'cfws'):
644644
res[-1] = TokenList(last[:-1])
645645
is_tl = isinstance(tok, TokenList)
646-
if (is_tl and last.token_type == 'dot' and
646+
if (is_tl and last.token_type == 'dot' and tok and
647647
tok[0].token_type == 'cfws'):
648648
res.append(TokenList(tok[1:]))
649649
else:

0 commit comments

Comments
 (0)