Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d3304e3

Browse files
committed
FileExistsError is raised by mkdir when dir exists
Reported by Saul Spatz on docs@
1 parent 8724a2a commit d3304e3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/library/os.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,8 +1624,8 @@ features:
16241624
Create a directory named *path* with numeric mode *mode*.
16251625

16261626
On some systems, *mode* is ignored. Where it is used, the current umask
1627-
value is first masked out. If the directory already exists, :exc:`OSError`
1628-
is raised.
1627+
value is first masked out. If the directory already exists,
1628+
:exc:`FileExistsError` is raised.
16291629

16301630
This function can also support :ref:`paths relative to directory descriptors
16311631
<dir_fd>`.

0 commit comments

Comments
 (0)