We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b0fbe2 commit 619b19fCopy full SHA for 619b19f
Lib/email/_header_value_parser.py
@@ -639,11 +639,11 @@ def local_part(self):
639
for tok in self[0] + [DOT]:
640
if tok.token_type == 'cfws':
641
continue
642
- if (last_is_tl and tok.token_type == 'dot' and
+ if (last_is_tl and tok.token_type == 'dot' and last and
643
last[-1].token_type == 'cfws'):
644
res[-1] = TokenList(last[:-1])
645
is_tl = isinstance(tok, TokenList)
646
- if (is_tl and last.token_type == 'dot' and
+ if (is_tl and last.token_type == 'dot' and tok and
647
tok[0].token_type == 'cfws'):
648
res.append(TokenList(tok[1:]))
649
else:
0 commit comments