[issue10436] tarfile.extractfile in "r|" stream mode fails with filenames or members from getmembers()
May 9, 2017
1:08 p.m.
flying sheep added the comment: well, we should just allow extractall(members=['foo', 'bar']) currently members only accepts TarInfo objects, not filenames, but it’s easy to accept both. https://github.com/python/cpython/blob/74683fc6247c522ae955a6e7308b8ff51def3... sth like: filenames = set() for member in members: if isinstance(member, TarInfo): # do what’s done now else: filenames.add(member) for tarinfo in self: if tarinfo.name in filenames: self.extract(tarinfo) ---------- nosy: +flying sheep _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue10436> _______________________________________
3325
Age (days ago)
3325
Last active (days ago)
0 comments
1 participants
participants (1)
-
flying sheep