Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8ba4036

Browse files
committed
The _fromlinepattern was a little too restrictive -- some sendmails
don't put the seconds in the time!
1 parent b3bf2cd commit 8ba4036

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/mailbox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def _search_end(self):
108108
# the 5 characters "From ".
109109

110110
_fromlinepattern = r"From \s*[^\s]+\s+\w\w\w\s+\w\w\w\s+\d?\d\s+" \
111-
r"\d?\d:\d\d:\d\d(\s+[^\s]+)?\s+\d\d\d\d\s*$"
111+
r"\d?\d:\d\d(:\d\d)?(\s+[^\s]+)?\s+\d\d\d\d\s*$"
112112
_regexp = None
113113

114114
def _isrealfromline(self, line):

0 commit comments

Comments
 (0)