Author chortos
Recipients chortos, nadeem.vawda, petri.lehtinen
Date 2011-07-27.21:07:48
SpamBayes Score 2.70131e-09
Marked as misclassified No
Message-id <>
I believe the attached patch fixes this problem, making zlib.Decompress.flush() raise the exception raised by zlib.decompress().

In the same patch, I also took the opportunity to correct a wrong comment in the implementation of flush() and change the error messages given by zlib.{De,C}ompress.flush() on {in,de}flateEnd() errors to the more end-user-friendly ones given in the same occasions by zlib.{de,}compress(). If this does not sound like a good thing to do, feel free (whoever ends up committing this) to remove these changes.

One uncomfortable issue I see with the patch is that zlib.Decompress.flush() now potentially gives an error message with Z_OK as the error code, but unless I misunderstand the comments in the real zlib’s zlib.h and that never happens (I was unable to produce a situation that would cause this), the only other options are faking another error code and setting an exception message whose format is different from all other exceptions raised by the zlib module.
Date User Action Args
2011-07-27 21:07:49chortossetrecipients: + chortos, nadeem.vawda, petri.lehtinen
2011-07-27 21:07:49chortossetmessageid: <>
2011-07-27 21:07:48chortoslinkissue12646 messages
2011-07-27 21:07:48chortoscreate