mirror of
https://github.com/python/cpython.git
synced 2025-09-19 07:00:59 +00:00
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.
This commit is contained in:
parent
2f90aa6366
commit
aa41b9b22b
1 changed files with 5 additions and 5 deletions
|
@ -214,7 +214,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
|
||||||
|
|
||||||
# It's now up to the protocol to handle the connection.
|
# It's now up to the protocol to handle the connection.
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
if self.get_debug():
|
if self._debug:
|
||||||
context = {
|
context = {
|
||||||
'message': ('Error on transport creation '
|
'message': ('Error on transport creation '
|
||||||
'for incoming connection'),
|
'for incoming connection'),
|
||||||
|
@ -312,7 +312,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
|
||||||
|
|
||||||
This method is a coroutine.
|
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")
|
raise ValueError("the socket must be non-blocking")
|
||||||
fut = futures.Future(loop=self)
|
fut = futures.Future(loop=self)
|
||||||
self._sock_recv(fut, False, sock, n)
|
self._sock_recv(fut, False, sock, n)
|
||||||
|
@ -350,7 +350,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
|
||||||
|
|
||||||
This method is a coroutine.
|
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")
|
raise ValueError("the socket must be non-blocking")
|
||||||
fut = futures.Future(loop=self)
|
fut = futures.Future(loop=self)
|
||||||
if data:
|
if data:
|
||||||
|
@ -393,7 +393,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
|
||||||
|
|
||||||
This method is a coroutine.
|
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")
|
raise ValueError("the socket must be non-blocking")
|
||||||
fut = futures.Future(loop=self)
|
fut = futures.Future(loop=self)
|
||||||
try:
|
try:
|
||||||
|
@ -453,7 +453,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
|
||||||
|
|
||||||
This method is a coroutine.
|
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")
|
raise ValueError("the socket must be non-blocking")
|
||||||
fut = futures.Future(loop=self)
|
fut = futures.Future(loop=self)
|
||||||
self._sock_accept(fut, False, sock)
|
self._sock_accept(fut, False, sock)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue