]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix exceptions mentioned in os.setxattr() docs (GH-25742)
authorShreyash Sharma <shreyash.sharma@philips.com>
Sat, 1 May 2021 20:54:39 +0000 (02:24 +0530)
committerGitHub <noreply@github.com>
Sat, 1 May 2021 20:54:39 +0000 (16:54 -0400)
Doc/library/os.rst

index b4c2ca9d4f66065657cdd1e699d8ef04c8725072..6f9f3219481c2b02f30e478c9c77859f0b2f6b5a 100644 (file)
@@ -3478,9 +3478,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 :term:`filesystem encoding and error handler`.  *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>`.