[issue1597011] Reading with bz2.BZ2File() returns one garbage character

Sean Reifschneider report at bugs.python.org
Thu Aug 30 11:39:57 CEST 2007


Sean Reifschneider added the comment:

Found some problems in the previous version, this one passes the tests
and I've also spent time reviewing the code and I think this is correct.
 Part of the problem is that only bzerror was being checked, not the
number of bytes read.  When bzerror is not BZ_OK, the code expects that
it returns a byte that was read, but in some cases it returns an error
when no bytes were read.

This code passes the test and also correctly handles the bz2 file that
is the object of this bug.

_____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1597011>
_____________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: python-trunk-bz2-v2.patch
Type: text/x-patch
Size: 2109 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-bugs-list/attachments/20070830/a9685f25/attachment-0001.bin 


More information about the Python-bugs-list mailing list