summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-08-23 11:16:57 -0700
committerBen Pfaff <blp@nicira.com>2011-08-24 12:06:53 -0700
commit8ba31bf16d03c449fbf40ec00d9a816b4ec05018 (patch)
tree09d1c693c856a5abf2d73f9a21d0037b3a6e7124
parent63b1a5213331cd962be05df57f1375db902216c5 (diff)
downloadopenvswitch-8ba31bf16d03c449fbf40ec00d9a816b4ec05018.tar.gz
ovs.stream: Simplify logic in Stream.wait().
Suggested-by: Reid Price <reid@nicira.com>
-rw-r--r--python/ovs/stream.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/ovs/stream.py b/python/ovs/stream.py
index 5954c3148..82d4557e9 100644
--- a/python/ovs/stream.py
+++ b/python/ovs/stream.py
@@ -206,10 +206,10 @@ class Stream(object):
if self.state == Stream.__S_CONNECTING:
wait = Stream.W_CONNECT
- if wait in (Stream.W_CONNECT, Stream.W_SEND):
- poller.fd_wait(self.socket, select.POLLOUT)
- else:
+ if wait == Stream.W_RECV:
poller.fd_wait(self.socket, select.POLLIN)
+ else:
+ poller.fd_wait(self.socket, select.POLLOUT)
def connect_wait(self, poller):
self.wait(poller, Stream.W_CONNECT)