[ python-Bugs-925107 ] _Subfile.readline( ) in mailbox.py ignoring
self.stop
SourceForge.net
noreply at sourceforge.net
Wed Jul 7 16:09:54 CEST 2004
Bugs item #925107, was opened at 2004-03-28 18:31
Message generated for change (Comment added) made by akuchling
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=925107&group_id=5470
Category: Python Library
Group: Python 2.3
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Sye van der Veen (syeberman)
>Assigned to: A.M. Kuchling (akuchling)
Summary: _Subfile.readline( ) in mailbox.py ignoring self.stop
Initial Comment:
I'm using Python 2.3.3 (on Windows, but that shouldn't
matter) and I've noticed a problem with the internal
_Subfile class in mailbox.py. The readline method
doesn't consider self.stop if the length argument is not
None. It has:
if length is None:
length = self.stop - self.pos
when really it should have something like:
if length is None or length < 0:
length = remaining
elif length > remaining:
length = remaining
which is what the read method does.
----------------------------------------------------------------------
>Comment By: A.M. Kuchling (akuchling)
Date: 2004-07-07 10:09
Message:
Logged In: YES
user_id=11375
Applied to CVS head; thanks, everyone!
----------------------------------------------------------------------
Comment By: Johannes Gijsbers (jlgijsbers)
Date: 2004-06-05 11:43
Message:
Logged In: YES
user_id=469548
This is correct. After fixing this bug the read() and
readline() methods are identical, except for one function
call, so my patch refactors their bodies into an internal
_read() method.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=925107&group_id=5470
More information about the Python-bugs-list
mailing list