summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/library/asyncore.rst3
-rw-r--r--Lib/asyncore.py2
-rw-r--r--Lib/test/test_asyncore.py3
3 files changed, 5 insertions, 3 deletions
diff --git a/Doc/library/asyncore.rst b/Doc/library/asyncore.rst
index 4736a9c..a2e1b5e 100644
--- a/Doc/library/asyncore.rst
+++ b/Doc/library/asyncore.rst
@@ -81,7 +81,8 @@ any that have been added to the map during asynchronous service) is closed.
+----------------------+----------------------------------------+
| Event | Description |
+======================+========================================+
- | ``handle_connect()`` | Implied by the first write event |
+ | ``handle_connect()`` | Implied by the first read or write |
+ | | event |
+----------------------+----------------------------------------+
| ``handle_close()`` | Implied by a read event with no data |
| | available |
diff --git a/Lib/asyncore.py b/Lib/asyncore.py
index 07b0499..4f1153b 100644
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -401,7 +401,7 @@ class dispatcher:
sys.stderr.write('log: %s\n' % str(message))
def log_info(self, message, type='info'):
- if __debug__ or type not in self.ignore_log_types:
+ if type not in self.ignore_log_types:
print '%s: %s' % (type, message)
def handle_read_event(self):
diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py
index 72de850..13b39e1 100644
--- a/Lib/test/test_asyncore.py
+++ b/Lib/test/test_asyncore.py
@@ -298,6 +298,7 @@ class DispatcherTests(unittest.TestCase):
def test_unhandled(self):
d = asyncore.dispatcher()
+ d.ignore_log_types = ()
# capture output of dispatcher.log_info() (to stdout via print)
fp = StringIO()
@@ -313,7 +314,7 @@ class DispatcherTests(unittest.TestCase):
sys.stdout = stdout
lines = fp.getvalue().splitlines()
- expected = ['warning: unhandled exception',
+ expected = ['warning: unhandled incoming priority event',
'warning: unhandled read event',
'warning: unhandled write event',
'warning: unhandled connect event',