[issue46922] tarfile.TarFile.next() crashes on empty tar files

2022-03-04 Thread Ethan Furman
Change by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46922] tarfile.TarFile.next() crashes on empty tar files

2022-03-04 Thread progval
New submission from progval : Hi, I found two related bugs when calling tarfile.TarFile.next() on an empty tar file, both when trying to seek when it should not: import io import tarfile # Create a tarball with no member: fd = io.BytesIO() with tarfile.open(fileobj=fd, mode="w") as tf: