[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception.
Arfrever Frehtes Taifersar Arahesis
report at bugs.python.org
Sun Jul 25 02:15:27 CEST 2010
Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com> added the comment:
I suggest to raise exception when target regular file exists:
try:
mkdir(name, mode)
except OSError as e:
if not (exist_ok and e.errno == errno.EEXIST and path.isdir(name)):
raise
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9299>
_______________________________________
More information about the Python-bugs-list
mailing list