Commit e0ffa11d authored by Jelte Jansen's avatar Jelte Jansen
Browse files

[master] Merge remote-tracking branch 'origin/trac2190'

parents b97e136d 63e83a8f
...@@ -131,9 +131,9 @@ class MsgQ: ...@@ -131,9 +131,9 @@ class MsgQ:
def setup_poller(self): def setup_poller(self):
"""Set up the poll thing. Internal function.""" """Set up the poll thing. Internal function."""
try: try:
self.poller = select.poll()
except AttributeError:
self.kqueue = select.kqueue() self.kqueue = select.kqueue()
except AttributeError:
self.poller = select.poll()
def add_kqueue_socket(self, socket, write_filter=False): def add_kqueue_socket(self, socket, write_filter=False):
"""Add a kquque filter for a socket. By default the read """Add a kquque filter for a socket. By default the read
......
...@@ -107,19 +107,10 @@ class MockMsgq: ...@@ -107,19 +107,10 @@ class MockMsgq:
def run(self): def run(self):
self._started.set() self._started.set()
try:
self.msgq.run() self.msgq.run()
except Exception:
pass
finally:
# explicitly shut down the socket of the msgq before
# shutting down the msgq
self.msgq.listen_socket.shutdown(msgq.socket.SHUT_RDWR)
self.msgq.shutdown()
def shutdown(self): def shutdown(self):
# do nothing self.msgq.shutdown()
pass
class MockCfgmgr: class MockCfgmgr:
def __init__(self): def __init__(self):
......
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