Author: Julian Berman <julian...@grayvines.com> Branch: zlib-copying-third-time-a-charm Changeset: r95880:1c38b412ceb1 Date: 2019-02-07 07:54 +0100 http://bitbucket.org/pypy/pypy/changeset/1c38b412ceb1/
Log: Notice when we're copying a flushed decompressobj too. Hopefully we go green. Otherwise we go home... diff --git a/pypy/module/zlib/interp_zlib.py b/pypy/module/zlib/interp_zlib.py --- a/pypy/module/zlib/interp_zlib.py +++ b/pypy/module/zlib/interp_zlib.py @@ -323,12 +323,16 @@ try: self.lock() try: + if not self.stream: + raise oefmt( + space.w_ValueError, + "Decompressor was already flushed", + ) copied = rzlib.inflateCopy(self.stream) finally: self.unlock() except rzlib.RZlibError as e: raise zlib_error(space, e.msg) - return Decompress( space=space, stream=copied, _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit