summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-07-02 23:05:32 (GMT)
committerGuido van Rossum <guido@python.org>1998-07-02 23:05:32 (GMT)
commit8ba4036a40ca06c9e91e0ca2056e157e3594388b (patch)
tree7c81bfc976c5c92a176e31752cc3d231772e2edb
parentb3bf2cd64b12dc0f858a70eda2f42e9670f695bb (diff)
downloadcpython-8ba4036a40ca06c9e91e0ca2056e157e3594388b.zip
cpython-8ba4036a40ca06c9e91e0ca2056e157e3594388b.tar.gz
cpython-8ba4036a40ca06c9e91e0ca2056e157e3594388b.tar.bz2
The _fromlinepattern was a little too restrictive -- some sendmails
don't put the seconds in the time!
-rwxr-xr-xLib/mailbox.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/mailbox.py b/Lib/mailbox.py
index 0ea4a58..9cf3e07 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):