mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-01-29 20:42:09 +01:00
Revert "contrib/ovs/stream.py: TypeError: bad operand type for unary -: 'NoneType'"
This reverts commit c3a41d06a654ea81cdc79d7bda5106d05f2e1deb. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
c5c7dc9cfe
commit
dae4bc4dc3
@ -152,10 +152,9 @@ class Stream(object):
|
||||
assert retval != errno.EINPROGRESS
|
||||
if retval == 0:
|
||||
self.state = Stream.__S_CONNECTED
|
||||
else:
|
||||
elif retval != errno.EAGAIN:
|
||||
self.state = Stream.__S_DISCONNECTED
|
||||
self.error = retval
|
||||
if retval != errno.EAGAIN:
|
||||
self.state = Stream.__S_DISCONNECTED
|
||||
|
||||
def connect(self):
|
||||
"""Tries to complete the connection on this stream. If the connection
|
||||
@ -167,11 +166,6 @@ class Stream(object):
|
||||
last_state = self.state
|
||||
if self.state == Stream.__S_CONNECTING:
|
||||
self.__scs_connecting()
|
||||
if self.state == Stream.__S_CONNECTING:
|
||||
# try again
|
||||
assert self.error == errno.EAGAIN
|
||||
last_state = -1
|
||||
assert self.state != last_state
|
||||
elif self.state == Stream.__S_CONNECTED:
|
||||
return 0
|
||||
elif self.state == Stream.__S_DISCONNECTED:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user