mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +00:00
python: Avoid using 'tuple' as a variable name.
'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>
This commit is contained in:
@@ -88,15 +88,14 @@ class Stream(object):
|
|||||||
return 0, Stream(sock, name, bind_path, status)
|
return 0, Stream(sock, name, bind_path, status)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def open_block(tuple):
|
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.
|
Stream.open(). Returns a tuple of the same form.
|
||||||
|
|
||||||
Typical usage:
|
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"))"""
|
||||||
|
|
||||||
error, stream = tuple
|
|
||||||
if not error:
|
if not error:
|
||||||
while True:
|
while True:
|
||||||
error = stream.connect()
|
error = stream.connect()
|
||||||
|
|||||||
Reference in New Issue
Block a user