[pypy-dev] [pypy-commit] pypy default: fix bz2. tests didn't find this.

Maciej Fijalkowski fijall at gmail.com
Mon Sep 5 08:54:52 CEST 2011


On Wed, Aug 31, 2011 at 8:18 AM, justinpeel <noreply at buildbot.pypy.org> wrote:
> Author: Justin Peel <notmuchtotell at gmail.com>
> Branch:
> Changeset: r46937:b4d8eb5fdf6c
> Date: 2011-08-31 00:17 -0600
> http://bitbucket.org/pypy/pypy/changeset/b4d8eb5fdf6c/
>
> Log:    fix bz2. tests didn't find this.
>
> diff --git a/pypy/module/bz2/interp_bz2.py b/pypy/module/bz2/interp_bz2.py
> --- a/pypy/module/bz2/interp_bz2.py
> +++ b/pypy/module/bz2/interp_bz2.py
> @@ -446,7 +446,9 @@
>             result = self.buffer[pos:pos + n]
>             self.pos += n
>         else:
> -            result = self.buffer
> +            pos = self.pos
> +            assert pos >= 0
> +            result = self.buffer[pos:]
>             self.pos = 0
>             self.buffer = ""
>         self.readlength += len(result)
> _______________________________________________
> pypy-commit mailing list
> pypy-commit at python.org
> http://mail.python.org/mailman/listinfo/pypy-commit
>

This should come with a test


More information about the pypy-dev mailing list