Andreas Stührk <[email protected]> added the comment:
The infinite recursion happens because `open` in tarfile is really
`TarFile.open` (see last line in the module). The builtin `open` is imported as
`_open`.
I also think that explicitly checking for "fileobj" being None is a cleaner
solution. With your current method (trying to open the file beforehand), you
will introduce a race condition: If the file exists when you open it for the
first time but has been deleted when you try to open it the second time, the
exact same error will happen ("fileobj" being None, that is).
----------
nosy: +Trundle
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11513>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com