File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1519,14 +1519,14 @@ def get_obs_local_part(value):
1519
1519
else :
1520
1520
if (obs_local_part [0 ].token_type == 'dot'
1521
1521
or (obs_local_part [0 ].token_type == 'cfws'
1522
- and len (obs_local_part ) == 1
1523
- or obs_local_part [1 ].token_type == 'dot' )):
1522
+ and len (obs_local_part ) > 1
1523
+ and obs_local_part [1 ].token_type == 'dot' )):
1524
1524
obs_local_part .defects .append (errors .InvalidHeaderDefect (
1525
1525
"Invalid leading '.' in local part" ))
1526
1526
if (obs_local_part [- 1 ].token_type == 'dot'
1527
1527
or (obs_local_part [- 1 ].token_type == 'cfws'
1528
- and len (obs_local_part ) == 1
1529
- or obs_local_part [- 2 ].token_type == 'dot' )):
1528
+ and len (obs_local_part ) > 1
1529
+ and obs_local_part [- 2 ].token_type == 'dot' )):
1530
1530
obs_local_part .defects .append (errors .InvalidHeaderDefect (
1531
1531
"Invalid trailing '.' in local part" ))
1532
1532
if obs_local_part .defects :
You can’t perform that action at this time.
0 commit comments