bpo-41737: expand doc for NotADirectoryError (GH-27471)

This commit is contained in:
andrei kulakov 2021-08-03 07:28:09 -04:00 committed by GitHub
parent 8c9f847997
commit f7c23a99cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -690,8 +690,10 @@ depending on the system error code.
.. exception:: NotADirectoryError
Raised when a directory operation (such as :func:`os.listdir`) is requested
on something which is not a directory.
Raised when a directory operation (such as :func:`os.listdir`) is requested on
something which is not a directory. On most POSIX platforms, it may also be
raised if an operation attempts to open or traverse a non-directory file as if
it were a directory.
Corresponds to :c:data:`errno` ``ENOTDIR``.
.. exception:: PermissionError