zc.recipe.cmmi untar fails on windows due to incorrect saving

Bug #261367 reported by Dylan Jay on 2008-08-26
Affects Status Importance Assigned to Milestone

Bug Description

Something strange is happening with cmmi on windows to do with the download and save step.

open(fname, 'w').write(urllib2.urlopen(url).read())

I get strange unpacking errors like

zlib.error: Error -3 while decompressing: invalid literal/lengths set


error: Error -3 while decompressing: invalid distance too far back

The reason is the file size of the tgz file in the download cache is different than if I just download it myself. 1 byte different. And if I put the wget downloaded version into the download cache then the unpack works fine.

I have patched it so that open uses 'wb' instead of 'w' and that fixes the problem on windows. not sure about other oses

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers