[pypy-commit] pypy default: fix bz2. tests didn't find this.
justinpeel
noreply at buildbot.pypy.org
Wed Aug 31 08:18:35 CEST 2011
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)
More information about the pypy-commit
mailing list