]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix exceptions mentioned in os.setxattr() docs (GH-25742) (GH-25795)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 1 May 2021 20:56:53 +0000 (13:56 -0700)
committerGitHub <noreply@github.com>
Sat, 1 May 2021 20:56:53 +0000 (16:56 -0400)
(cherry picked from commit 779232413a367cd3357482e675a5518de102a90e)

Co-authored-by: Shreyash Sharma <shreyash.sharma@philips.com>
Co-authored-by: Shreyash Sharma <shreyash.sharma@philips.com>
Doc/library/os.rst

index 719ea5b588f49a55551b0b4b88afc211c0b3be1b..d0a37a8bbdbf059366f38a2122577c869bc8a54f 100644 (file)
@@ -3237,9 +3237,9 @@ These functions are all available on Linux only.
    indirectly through the :class:`PathLike` interface). If it is a str,
    it is encoded with the filesystem encoding.  *flags* may be
    :data:`XATTR_REPLACE` or :data:`XATTR_CREATE`. If :data:`XATTR_REPLACE` is
-   given and the attribute does not exist, ``EEXISTS`` will be raised.
+   given and the attribute does not exist, ``ENODATA`` will be raised.
    If :data:`XATTR_CREATE` is given and the attribute already exists, the
-   attribute will not be created and ``ENODATA`` will be raised.
+   attribute will not be created and ``EEXISTS`` will be raised.
 
    This function can support :ref:`specifying a file descriptor <path_fd>` and
    :ref:`not following symlinks <follow_symlinks>`.