diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-18 21:16:44 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-18 21:16:44 (GMT) |
commit | 5f11a00056aba124cdeba717b68c4145f96bcfc7 (patch) | |
tree | 0289773ac6e13c8dfabf1a20cad9b0b958143083 | |
parent | 0832af6628ca5ac02d0226899725297dd508470b (diff) | |
download | cpython-5f11a00056aba124cdeba717b68c4145f96bcfc7.zip cpython-5f11a00056aba124cdeba717b68c4145f96bcfc7.tar.gz cpython-5f11a00056aba124cdeba717b68c4145f96bcfc7.tar.bz2 |
Mention OSError instead of IOError in the docs.
-rw-r--r-- | Doc/faq/library.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/faq/library.rst b/Doc/faq/library.rst index cab2d7b..8043460 100644 --- a/Doc/faq/library.rst +++ b/Doc/faq/library.rst @@ -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 |