[issue27590] tarfile module next() method hides exceptions

2021-04-26 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.11 -Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue27590] tarfile module next() method hides exceptions

2016-07-25 Thread Yujie Chen
Yujie Chen added the comment: I do want tarfile module to stop at the first invalid header. My question is why does tarfile module NOT throw exception about the error in header, instead it just hide it silently. -- ___ Python tracker

[issue27590] tarfile module next() method hides exceptions

2016-07-24 Thread Lars Gustäbel
Lars Gustäbel added the comment: The question is what you're trying to accomplish. If you just want to prevent tarfile from stopping at the first invalid header in order to extract everything following it, you may use the ignore_zeros=True keyword argument. --

[issue27590] tarfile module next() method hides exceptions

2016-07-22 Thread Yujie Chen
Yujie Chen added the comment: Yeah, I just tried on Python3.5 and it didn't report any errors either. -- ___ Python tracker ___

[issue27590] tarfile module next() method hides exceptions

2016-07-22 Thread R. David Murray
R. David Murray added the comment: OK, I've closed #16858 in favor of this one, since we at least had some discussion here. I see you selected 2.7. Does python3 have the same issues? (I'm guessing it does, though there has been some work done on the module.) -- nosy: +mmarkk

[issue27590] tarfile module next() method hides exceptions

2016-07-22 Thread Yujie Chen
Yujie Chen added the comment: The other issue is http://bugs.python.org/issue16858 -- ___ Python tracker ___

[issue27590] tarfile module next() method hides exceptions

2016-07-22 Thread R. David Murray
R. David Murray added the comment: That would be my guess. If we are reading along and we hit garbage data, we assume we've reached the end of the tar. That doesn't mean there isn't room for improvement, or perhaps issuing a warning message about why we think we hit the end of the tar.

[issue27590] tarfile module next() method hides exceptions

2016-07-22 Thread Yujie Chen
New submission from Yujie Chen: I have seen a similar ticket, however that was opened 2 years ago and has nothing more than a brief description. So I opened this new one here, hoping to get some answers. tarfile.TarFile object is iterable and has a next() method. next() will parse the header