Jurko Gospodnetić <jurko.gospodne...@gmail.com> added the comment: Also this class, because it defines __del__ too simply, will display a user-unfriendly error message when cleaning up a TemporaryDirectory object whose constructor raised an exception when attempting to create its temporary folder.
For example try to create a TemporaryDirectory with prefix="aa>aa" on Windows. That should fail as folders there can not contain '>' characters and later on in the program you should get an error message something like this one: Exception AttributeError: "'TemporaryDirectory' object has no attribute '_closed'" in <bound method TemporaryDirectory.cleanup of <tempfile.TemporaryDirectory object at 0x00CE1E10>> ignored Hope this helps. [Sorry, did not know whether to add this as a separate issue as it seemed kind of related to this one.] ---------- nosy: +Jurko.Gospodnetić _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10188> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com