Martin Panter added the comment:

Yes that looks like an improvement, though I wonder what’s wrong with your 
original proposal (performance maybe?). In any case, it definitely needs a 
comment explaining the first isdir() avoids competing failures that mask 
EEXIST, and the exception handling avoids the race to create the directory.

A test case for the test suite would also be good. I understand it should be 
easy to do for Windows, just make a directory with an absolute path including a 
drive root like d:\.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25583>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to