diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2012-09-12 15:17:21 +0900 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2012-09-12 11:40:39 -0700 |
commit | 6d3c5b64b3a25461ecf8a1f8b0e7af19e1683ebd (patch) | |
tree | e66b3ebb6bb150b11b5162b7140eaa01da87095b /python | |
parent | 9bab681f33e09882e8f652c8e96a2b998b3ef9b3 (diff) |
python/ovs: socket_util uses select.poll
The changeset of ed815d9bd28422a490fe370d7804d24bcd676806 eliminated
the use of select.poll for eventlet/gevent.
It forgot to select.poll in socket_util.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'python')
-rw-r--r-- | python/ovs/poller.py | 4 | ||||
-rw-r--r-- | python/ovs/socket_util.py | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/python/ovs/poller.py b/python/ovs/poller.py index 5c89f231..c04c9b36 100644 --- a/python/ovs/poller.py +++ b/python/ovs/poller.py @@ -73,7 +73,7 @@ class _SelectSelect(object): return events_dict.items() -_SelectPoll = _SelectSelect +SelectPoll = _SelectSelect # If eventlet/gevent isn't used, we can use select.poll by replacing # _SelectPoll with select.poll class # _SelectPoll = select.poll @@ -181,5 +181,5 @@ class Poller(object): vlog.dbg("%s on fd %d" % (s, fd)) def __reset(self): - self.poll = _SelectPoll() + self.poll = SelectPoll() self.timeout = -1 diff --git a/python/ovs/socket_util.py b/python/ovs/socket_util.py index a8e8d92e..a9787073 100644 --- a/python/ovs/socket_util.py +++ b/python/ovs/socket_util.py @@ -19,6 +19,7 @@ import socket import sys import ovs.fatal_signal +import ovs.poller import ovs.vlog vlog = ovs.vlog.Vlog("socket_util") @@ -75,7 +76,7 @@ def make_unix_socket(style, nonblock, bind_path, connect_path): def check_connection_completion(sock): - p = select.poll() + p = ovs.poller.SelectPoll() p.register(sock, select.POLLOUT) if len(p.poll(0)) == 1: return get_socket_error(sock) |