2006-05-15 04:23:15 |
Stuart Bishop |
description |
OOPS-133C192
This appears to be a bug in Python's tarfile module. If a gzipped tar file is passed to TarFile.open using the fileobj argument, and the order of the keys of the tarfile.TarFile.METH_OPEN dictionary returns "bz2" before "gz", then "ValueError: no support for external file objects" is raised.
On my i386-architecture laptop, the dictionary-ordering luckily avoids this bug, but I'm guessing that for some reason it's different on Launchpad's production servers (64-bit?).
We can work around by detecting gzip files ourselves (with "content.startswith('\037\213')") and explicitly calling gzopen instead of open.
|
OOPS-133C192
This appears to be a bug in Python's tarfile module. If a gzipped tar file is passed to TarFile.open using the fileobj argument, and the order of the keys of the tarfile.TarFile.OPEN_METH dictionary returns "bz2" before "gz", then "ValueError: no support for external file objects" is raised.
On my i386-architecture laptop, the dictionary-ordering luckily avoids this bug, but I'm guessing that for some reason it's different on Launchpad's production servers (64-bit?).
We can work around by detecting gzip files ourselves (with "content.startswith('\037\213')") and explicitly calling gzopen instead of open.
|
|