Commit 5f11a000 authored by Andrew Svetlov's avatar Andrew Svetlov

Mention OSError instead of IOError in the docs.

parent 0832af66
...@@ -209,7 +209,7 @@ using curses, but curses is a fairly large module to learn. ...@@ -209,7 +209,7 @@ using curses, but curses is a fairly large module to learn.
try: try:
c = sys.stdin.read(1) c = sys.stdin.read(1)
print("Got character", repr(c)) print("Got character", repr(c))
except IOError: except OSError:
pass pass
finally: finally:
termios.tcsetattr(fd, termios.TCSAFLUSH, oldterm) termios.tcsetattr(fd, termios.TCSAFLUSH, oldterm)
...@@ -222,7 +222,7 @@ using curses, but curses is a fairly large module to learn. ...@@ -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 :func:`termios.tcsetattr` turns off stdin's echoing and disables canonical
mode. :func:`fcntl.fnctl` is used to obtain stdin's file descriptor flags 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 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 Threads
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment