[Python-bugs-list] [ python-Bugs-818065 ] mailbox._Subfile readline() bug

SourceForge.net noreply at sourceforge.net
Sun Oct 5 07:09:24 EDT 2003


Bugs item #818065, was opened at 2003-10-05 11:09
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=818065&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jonathan Perez (jbperez808)
Assigned to: Nobody/Anonymous (nobody)
Summary: mailbox._Subfile readline() bug

Initial Comment:
mailbox._Subfile's readline() will chop off the first

character of the next line when reading Unix-style

terminated files.  It's surprising no one has mentioned

this before.



The problem lies in line mailbox._Subfile.readline()

itself where self.pos is assigned self.fp.tell()'s

value.  You will need to subtract 1 from self.pos if a

file uses unix-style termination.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=818065&group_id=5470



More information about the Python-bugs-list mailing list