X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=python%2Fovs%2Fstream.py;h=35f2e0ce7f960ea430eb7ae7a47c18212a1eb5d7;hb=e7ed3a3a5f87d20f0cc632ae23adba6f30a4e19d;hp=20cd7fe2487827ccbdc3cbf4c75ec007611dad7b;hpb=1f9dd59cf178b0765727f6908e135f48c766e213;p=openvswitch diff --git a/python/ovs/stream.py b/python/ovs/stream.py index 20cd7fe2..35f2e0ce 100644 --- a/python/ovs/stream.py +++ b/python/ovs/stream.py @@ -17,7 +17,6 @@ import logging import os import select import socket -import sys import ovs.poller import ovs.socket_util @@ -206,10 +205,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) @@ -220,9 +219,6 @@ class Stream(object): def send_wait(self, poller): self.wait(poller, Stream.W_SEND) - def get_name(self): - return self.name - def __del__(self): # Don't delete the file: we might have forked. self.socket.close() @@ -303,7 +299,7 @@ class PassiveStream(object): # Don't delete the file: we might have forked. self.socket.close() -def usage(name, active, passive, bootstrap): +def usage(name, active, passive): print if active: print("Active %s connection methods:" % name)