diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-02-04 13:50:59 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-02-04 13:50:59 (GMT) |
commit | aa41b9b22b139d241dd97f8baf0fda56fe719c36 (patch) | |
tree | 3996cbddb3d3fcb3c733386c5f2c26a8400d6f19 /Lib/asyncio | |
parent | 2f90aa63666308e7a9b2d0a89110e0be445a393a (diff) | |
download | cpython-aa41b9b22b139d241dd97f8baf0fda56fe719c36.zip cpython-aa41b9b22b139d241dd97f8baf0fda56fe719c36.tar.gz cpython-aa41b9b22b139d241dd97f8baf0fda56fe719c36.tar.bz2 |
asyncio: BaseSelectorEventLoop uses directly the private _debug attribute
Just try to be consistent: _debug was already used in some places, and always
used in BaseProactorEventLoop.
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/selector_events.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py index 4bd6dc8..7cbd4fd 100644 --- a/Lib/asyncio/selector_events.py +++ b/Lib/asyncio/selector_events.py @@ -214,7 +214,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop): # It's now up to the protocol to handle the connection. except Exception as exc: - if self.get_debug(): + if self._debug: context = { 'message': ('Error on transport creation ' 'for incoming connection'), @@ -312,7 +312,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop): This method is a coroutine. """ - if self.get_debug() and sock.gettimeout() != 0: + if self._debug and sock.gettimeout() != 0: raise ValueError("the socket must be non-blocking") fut = futures.Future(loop=self) self._sock_recv(fut, False, sock, n) @@ -350,7 +350,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop): This method is a coroutine. """ - if self.get_debug() and sock.gettimeout() != 0: + if self._debug and sock.gettimeout() != 0: raise ValueError("the socket must be non-blocking") fut = futures.Future(loop=self) if data: @@ -393,7 +393,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop): This method is a coroutine. """ - if self.get_debug() and sock.gettimeout() != 0: + if self._debug and sock.gettimeout() != 0: raise ValueError("the socket must be non-blocking") fut = futures.Future(loop=self) try: @@ -453,7 +453,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop): This method is a coroutine. """ - if self.get_debug() and sock.gettimeout() != 0: + if self._debug and sock.gettimeout() != 0: raise ValueError("the socket must be non-blocking") fut = futures.Future(loop=self) self._sock_accept(fut, False, sock) |