]> granicus.if.org Git - python/commitdiff
Mention OSError instead of IOError in the docs.
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Tue, 18 Dec 2012 21:16:44 +0000 (23:16 +0200)
committerAndrew Svetlov <andrew.svetlov@gmail.com>
Tue, 18 Dec 2012 21:16:44 +0000 (23:16 +0200)
Doc/faq/library.rst

index cab2d7b1a50998b547e97a3427be99f7ab900d6b..804346023f813ce56c9d05d9c6c26eefb6890337 100644 (file)
@@ -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