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

Skip to content

Commit d0d5154

Browse files
committed
Update fcntl doc: replace IOError with OSError
Issue #26716. IOError is a deprecated alias to OSError since Python 3.3.
1 parent 705c0e3 commit d0d5154

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/library/fcntl.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ The module defines the following functions:
8383
buffer 1024 bytes long which is then passed to :func:`ioctl` and copied back
8484
into the supplied buffer.
8585

86-
If the :c:func:`ioctl` fails, an :exc:`IOError` exception is raised.
86+
If the :c:func:`ioctl` fails, an :exc:`OSError` exception is raised.
8787

8888
An example::
8989

@@ -106,7 +106,7 @@ The module defines the following functions:
106106
:manpage:`flock(2)` for details. (On some systems, this function is emulated
107107
using :c:func:`fcntl`.)
108108

109-
If the :c:func:`flock` fails, an :exc:`IOError` exception is raised.
109+
If the :c:func:`flock` fails, an :exc:`OSError` exception is raised.
110110

111111

112112
.. function:: lockf(fd, cmd, len=0, start=0, whence=0)

Modules/fcntlmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ of the following values:
344344
345345
When operation is LOCK_SH or LOCK_EX, it can also be bitwise ORed with
346346
LOCK_NB to avoid blocking on lock acquisition. If LOCK_NB is used and the
347-
lock cannot be acquired, an IOError will be raised and the exception will
347+
lock cannot be acquired, an OSError will be raised and the exception will
348348
have an errno attribute set to EACCES or EAGAIN (depending on the operating
349349
system -- for portability, check for either value).
350350

0 commit comments

Comments
 (0)