diff options
Diffstat (limited to 'Doc/library/telnetlib.rst')
-rw-r--r-- | Doc/library/telnetlib.rst | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Doc/library/telnetlib.rst b/Doc/library/telnetlib.rst index 646634db7c..31e5dbbd20 100644 --- a/Doc/library/telnetlib.rst +++ b/Doc/library/telnetlib.rst @@ -162,9 +162,13 @@ Telnet Objects .. method:: Telnet.write(buffer) Write a byte string to the socket, doubling any IAC characters. This can - block if the connection is blocked. May raise :exc:`socket.error` if the + block if the connection is blocked. May raise :exc:`OSError` if the connection is closed. + .. versionchanged:: 3.3 + This method used to raise :exc:`socket.error`, which is now an alias + of :exc:`OSError`. + .. method:: Telnet.interact() @@ -181,7 +185,7 @@ Telnet Objects Read until one from a list of a regular expressions matches. The first argument is a list of regular expressions, either compiled - (:class:`re.RegexObject` instances) or uncompiled (byte strings). The + (:ref:`regex objects <re-objects>`) or uncompiled (byte strings). The optional second argument is a timeout, in seconds; the default is to block indefinitely. @@ -201,7 +205,7 @@ Telnet Objects .. method:: Telnet.set_option_negotiation_callback(callback) Each time a telnet option is read on the input flow, this *callback* (if set) is - called with the following parameters : callback(telnet socket, command + called with the following parameters: callback(telnet socket, command (DO/DONT/WILL/WONT), option). No other action is done afterwards by telnetlib. |