Commit 259d4544 authored by Vincent Pelletier's avatar Vincent Pelletier

Remove "try..except: pass ; else .." block.

This uncovered the bug fixed in r1553, and also uncovered a bug in
test_01_EpollEventManager (fixed in this commit).

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1650 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent f1ff4ca1
......@@ -178,11 +178,7 @@ class EpollEventManager(object):
if fd in r_done_set:
continue
r_done_set.add(fd)
try:
conn = self.connection_dict[fd]
except KeyError:
pass
else:
conn.lock()
try:
conn.readable()
......
......@@ -114,7 +114,10 @@ class EventTests(NeoTestBase):
w_connector = Mock({"getDescriptor" : 351621})
w_conn = Mock({'getConnector': w_connector})
em.register(w_conn)
em.epoll = Mock({"poll":((r_conn.getDescriptor(),),(w_conn.getDescriptor(),))})
em.epoll = Mock({"poll":(
(r_connector.getDescriptor(),),
(w_connector.getDescriptor(),),
)})
em.poll(timeout=10)
# check it called poll on epoll
self.assertEquals(len(em.epoll.mockGetNamedCalls("poll")), 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment