[Python-checkins] cpython (3.4): asyncio: BaseSelectorEventLoop uses directly the private _debug attribute
victor.stinner
python-checkins at python.org
Wed Feb 4 14:54:22 CET 2015
https://hg.python.org/cpython/rev/c02cde905034
changeset: 94500:c02cde905034
branch: 3.4
parent: 94498:8957ff9776bd
user: Victor Stinner <victor.stinner at gmail.com>
date: Wed Feb 04 14:50:59 2015 +0100
summary:
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.
files:
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
--- a/Lib/asyncio/selector_events.py
+++ b/Lib/asyncio/selector_events.py
@@ -214,7 +214,7 @@
# 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 @@
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 @@
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 @@
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 @@
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)
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list