'tuple' is a Python built-in function, so it's best to avoid using it as a
variable name.
Suggested-by: Reid Price <reid@nicira.com>
return 0, Stream(sock, name, bind_path, status)
@staticmethod
return 0, Stream(sock, name, bind_path, status)
@staticmethod
+ def open_block((error, stream)):
"""Blocks until a Stream completes its connection attempt, either
"""Blocks until a Stream completes its connection attempt, either
- succeeding or failing. 'tuple' should be the tuple returned by
+ succeeding or failing. (error, stream) should be the tuple returned by
Stream.open(). Returns a tuple of the same form.
Typical usage:
Stream.open(). Returns a tuple of the same form.
Typical usage:
- error, stream = Stream.open_block(Stream.open("tcp:1.2.3.4:5"))"""
+ error, stream = Stream.open_block(Stream.open("unix:/tmp/socket"))"""
if not error:
while True:
error = stream.connect()
if not error:
while True:
error = stream.connect()