Commit 9213da4c authored by Vincent Pelletier's avatar Vincent Pelletier

Remove unexplained try..except blocks.

Hiding exceptions is *bad* .

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1561 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 366205da
......@@ -227,40 +227,28 @@ class EpollEventManager(object):
pass
def addReader(self, conn):
try:
fd = conn.getConnector().getDescriptor()
if fd not in self.reader_set:
self.reader_set.add(fd)
self.epoll.modify(fd, 1, fd in self.writer_set)
except AttributeError:
pass
fd = conn.getConnector().getDescriptor()
if fd not in self.reader_set:
self.reader_set.add(fd)
self.epoll.modify(fd, 1, fd in self.writer_set)
def removeReader(self, conn):
try:
fd = conn.getConnector().getDescriptor()
if fd in self.reader_set:
self.reader_set.remove(fd)
self.epoll.modify(fd, 0, fd in self.writer_set)
except AttributeError:
pass
fd = conn.getConnector().getDescriptor()
if fd in self.reader_set:
self.reader_set.remove(fd)
self.epoll.modify(fd, 0, fd in self.writer_set)
def addWriter(self, conn):
try:
fd = conn.getConnector().getDescriptor()
if fd not in self.writer_set:
self.writer_set.add(fd)
self.epoll.modify(fd, fd in self.reader_set, 1)
except AttributeError:
pass
fd = conn.getConnector().getDescriptor()
if fd not in self.writer_set:
self.writer_set.add(fd)
self.epoll.modify(fd, fd in self.reader_set, 1)
def removeWriter(self, conn):
try:
fd = conn.getConnector().getDescriptor()
if fd in self.writer_set:
self.writer_set.remove(fd)
self.epoll.modify(fd, fd in self.reader_set, 0)
except AttributeError:
pass
fd = conn.getConnector().getDescriptor()
if fd in self.writer_set:
self.writer_set.remove(fd)
self.epoll.modify(fd, fd in self.reader_set, 0)
# Default to EpollEventManager.
EventManager = EpollEventManager
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