From d3304e3e20651665bdafd29ffbdf64f50ac753e6 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Mon, 25 Apr 2016 09:27:27 -0500 Subject: [PATCH] FileExistsError is raised by mkdir when dir exists Reported by Saul Spatz on docs@ --- Doc/library/os.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index f2cfdb4cbe2..0ff68574692 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1624,8 +1624,8 @@ features: Create a directory named *path* with numeric mode *mode*. On some systems, *mode* is ignored. Where it is used, the current umask - value is first masked out. If the directory already exists, :exc:`OSError` - is raised. + value is first masked out. If the directory already exists, + :exc:`FileExistsError` is raised. This function can also support :ref:`paths relative to directory descriptors `.