[issue21044] tempfile.TemporaryFile() shouldn't have a name attribute

Antoine Pietri report at bugs.python.org
Mon Mar 24 02:54:40 CET 2014


Antoine Pietri added the comment:

Alternatively, if the "name" attribute can't be removed, I propose the following diff for the tarfile module:

-if name is None and hasattr(fileobj, "name"):
+if name is None and hasattr(fileobj, "name") and isinstance(fileobj.name, str):

:-)

----------

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


More information about the Python-bugs-list mailing list