[issue28449] tarfile.open(mode = 'r:*', ignore_zeros = True) has 50% chance failed to open compressed tars?

Roland Bogosi report at bugs.python.org
Sun Oct 16 08:36:04 EDT 2016


Roland Bogosi added the comment:

For anyone finding this bug through Google before it is fixed, a workaround could be to monkeypatch the OPEN_METH dict with an OrderedDict:

	tarfile.TarFile.OPEN_METH = OrderedDict()
	tarfile.TarFile.OPEN_METH['gz']  = 'gzopen'
	tarfile.TarFile.OPEN_METH['bz2'] = 'bz2open'
	tarfile.TarFile.OPEN_METH['xz']  = 'xzopen'
	tarfile.TarFile.OPEN_METH['tar'] = 'taropen'

----------
nosy: +RoliSoft

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28449>
_______________________________________


More information about the Python-bugs-list mailing list