From 2335de7a2082f05c43977996533cee93384ff7a9 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 15 Nov 2013 16:51:48 -0800 Subject: asyncio: Replace connection_refused() with error_received(). --- Lib/asyncio/protocols.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Lib/asyncio/protocols.py') diff --git a/Lib/asyncio/protocols.py b/Lib/asyncio/protocols.py index d3a868599f..eb94fb6f29 100644 --- a/Lib/asyncio/protocols.py +++ b/Lib/asyncio/protocols.py @@ -100,15 +100,18 @@ class DatagramProtocol(BaseProtocol): def datagram_received(self, data, addr): """Called when some datagram is received.""" - def connection_refused(self, exc): - """Connection is refused.""" + def error_received(self, exc): + """Called when a send or receive operation raises an OSError. + + (Other than BlockingIOError or InterruptedError.) + """ class SubprocessProtocol(BaseProtocol): """ABC representing a protocol for subprocess calls.""" def pipe_data_received(self, fd, data): - """Called when subprocess write a data into stdout/stderr pipes. + """Called when the subprocess writes data into stdout/stderr pipe. fd is int file dascriptor. data is bytes object. @@ -122,5 +125,4 @@ class SubprocessProtocol(BaseProtocol): """ def process_exited(self): - """Called when subprocess has exited. - """ + """Called when subprocess has exited.""" -- cgit v1.2.1