[Patches] [ python-Patches-880621 ] incorrect end-of-message
handling in mailbox.BabylMailbox
SourceForge.net
noreply at sourceforge.net
Tue Jan 20 10:15:18 EST 2004
Patches item #880621, was opened at 2004-01-20 15:15
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=880621&group_id=5470
Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: KAJIYAMA, Tamito (kajiyama)
Assigned to: Nobody/Anonymous (nobody)
Summary: incorrect end-of-message handling in mailbox.BabylMailbox
Initial Comment:
The mailbox.BabylMailbox class does not handle end of
message correctly.
The last message in a mailbox ends in '\037' instead of
'\037\014\n'
(i.e. FF and LF do not exist at the end of the
mailbox). However, the
class in question does not take this special case into
account, so that
application programs get '\037' as the last line of the
last message.
Following is a simple fix of this bug:
--- mailbox.py.orig Tue Jan 20 23:10:32 2004
+++ mailbox.py Tue Jan 20 23:08:17 2004
@@ -263,7 +263,7 @@
line = self.fp.readline()
if not line:
return
- if line == '\037\014\n':
+ if line == '\037\014\n' or line == '\037':
self.fp.seek(pos)
return
The bug is in Python 2.3.3 and probably all of older
versions.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=880621&group_id=5470
More information about the Patches
mailing list