Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3ef1229b
Commit
3ef1229b
authored
May 23, 2011
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #12151: Test now ignores datagram socket errors after server is closed.
parent
17ec7cd9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
Lib/test/test_logging.py
Lib/test/test_logging.py
+11
-10
No files found.
Lib/test/test_logging.py
View file @
3ef1229b
...
...
@@ -888,7 +888,8 @@ if threading:
before calling :meth:`start`, so that the server will
set up the socket and listen on it.
"""
def __init__(self, addr, handler, poll_interval=0.5, bind_and_activate=True):
def __init__(self, addr, handler, poll_interval=0.5,
bind_and_activate=True):
class DelegatingUDPRequestHandler(DatagramRequestHandler):
def handle(self):
...
...
@@ -896,15 +897,15 @@ if threading:
def finish(self):
data = self.wfile.getvalue()
try
:
super(DelegatingUDPRequestHandler, self).finish()
except socket.error:
msg = ('Error during finish, while sending %r, '
'closed = %s')
print(msg % (data, self.server._closed), file=sys.stderr)
raise
ThreadingUDPServer.__init__(self, addr,
DelegatingUDPRequestHandler,
if data
:
try:
super(DelegatingUDPRequestHandler, self).finish()
except socket.error:
if not self.server._closed:
raise
ThreadingUDPServer.__init__(self, addr,
DelegatingUDPRequestHandler,
bind_and_activate)
ControlMixin.__init__(self, handler, poll_interval)
self._closed = False
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment