cpython: b365036b17c2 (original) (raw)
Mercurial > cpython
changeset 70002:b365036b17c2
Issue #12039: Now suppress spurious select.error raised on FreeBSD when the server (an asyncore.dispatcher) is closed. [#12039]
Vinay Sajip <vinay_sajip@yahoo.co.uk> | |
---|---|
date | Tue, 10 May 2011 07:48:28 +0100 |
parents | 0b8c7cf25d10 |
children | c4ced3719761 |
files | Lib/test/test_logging.py |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-)[+] [-] Lib/test/test_logging.py 9 |
line wrap: on
line diff
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -723,7 +723,14 @@ class TestSMTPServer(smtpd.SMTPServer):
:func:select
or :func:poll
call by
:func:asyncore.loop
.
"""
asyncore.loop(poll_interval, map=self.sockmap)[](#l1.7)
try:[](#l1.8)
asyncore.loop(poll_interval, map=self.sockmap)[](#l1.9)
except select.error:[](#l1.10)
# On FreeBSD 8, closing the server repeatably[](#l1.11)
# raises this error. We swallow it if the[](#l1.12)
# server has been closed.[](#l1.13)
if self.connected or self.accepting:[](#l1.14)
raise[](#l1.15)