Message 58924 - Python tracker (original) (raw)

I think we can fix this as follows: whenever it calls os.mkdir() and an error is returned, check if that is EISDIR or EEXISTS, and if so, check that indeed it now exists as a directory, and then ignore the error.

Moreover, I'd like to do this for the ultimate path to be created as well, so that os.makedirs() will succeed instead of failing. This would make the common usage pattern much simpler.

I think it should still fail if the path exists as a file though. (Or as a symlink to a file.)

Patch welcome!

I think this is a feature request and hence should only be fixed in 2.6.