From: Guido van Rossum Date: Thu, 2 Jul 1998 23:05:32 +0000 (+0000) Subject: The _fromlinepattern was a little too restrictive -- some sendmails X-Git-Tag: v1.5.2a1~350 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ba4036a40ca06c9e91e0ca2056e157e3594388b;p=thirdparty%2FPython%2Fcpython.git The _fromlinepattern was a little too restrictive -- some sendmails don't put the seconds in the time! --- diff --git a/Lib/mailbox.py b/Lib/mailbox.py index 0ea4a5811d74..9cf3e0762116 100755 --- a/Lib/mailbox.py +++ b/Lib/mailbox.py @@ -108,7 +108,7 @@ class UnixMailbox(_Mailbox): # the 5 characters "From ". _fromlinepattern = r"From \s*[^\s]+\s+\w\w\w\s+\w\w\w\s+\d?\d\s+" \ - r"\d?\d:\d\d:\d\d(\s+[^\s]+)?\s+\d\d\d\d\s*$" + r"\d?\d:\d\d(:\d\d)?(\s+[^\s]+)?\s+\d\d\d\d\s*$" _regexp = None def _isrealfromline(self, line):