[ python-Bugs-925107 ] _Subfile.readline( ) in mailbox.py ignoring self.stop

SourceForge.net noreply at sourceforge.net
Sun Mar 28 18:31:58 EST 2004


Bugs item #925107, was opened at 2004-03-28 18:31
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: Open
Resolution: None
Priority: 5
Submitted By: Sye van der Veen (syeberman)
Assigned to: Nobody/Anonymous (nobody)
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.

----------------------------------------------------------------------

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