mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
Mention OSError instead of IOError in the docs.
This commit is contained in:
parent
0832af6628
commit
5f11a00056
1 changed files with 2 additions and 2 deletions
|
@ -209,7 +209,7 @@ using curses, but curses is a fairly large module to learn.
|
|||
try:
|
||||
c = sys.stdin.read(1)
|
||||
print("Got character", repr(c))
|
||||
except IOError:
|
||||
except OSError:
|
||||
pass
|
||||
finally:
|
||||
termios.tcsetattr(fd, termios.TCSAFLUSH, oldterm)
|
||||
|
@ -222,7 +222,7 @@ using curses, but curses is a fairly large module to learn.
|
|||
:func:`termios.tcsetattr` turns off stdin's echoing and disables canonical
|
||||
mode. :func:`fcntl.fnctl` is used to obtain stdin's file descriptor flags
|
||||
and modify them for non-blocking mode. Since reading stdin when it is empty
|
||||
results in an :exc:`IOError`, this error is caught and ignored.
|
||||
results in an :exc:`OSError`, this error is caught and ignored.
|
||||
|
||||
|
||||
Threads
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue