mirror of
https://github.com/openvswitch/ovs
synced 2025-10-19 14:37:21 +00:00
stream.py: Make usage() function return a string.
This will marginally simplify a future patch.
This commit is contained in:
@@ -302,14 +302,10 @@ class PassiveStream(object):
|
|||||||
self.socket.close()
|
self.socket.close()
|
||||||
|
|
||||||
|
|
||||||
def usage(name, active, passive):
|
def usage(name):
|
||||||
print
|
return """
|
||||||
if active:
|
Active %s connection methods:
|
||||||
print("Active %s connection methods:" % name)
|
unix:FILE Unix domain socket named FILE
|
||||||
print(" unix:FILE "
|
|
||||||
"Unix domain socket named FILE")
|
|
||||||
|
|
||||||
if passive:
|
Passive %s connection methods:
|
||||||
print("Passive %s connection methods:" % name)
|
punix:FILE Listen on Unix domain socket FILE""" % (name, name)
|
||||||
print(" punix:FILE "
|
|
||||||
"listen on Unix domain socket FILE")
|
|
||||||
|
@@ -212,7 +212,7 @@ usage: %s [OPTIONS] COMMAND [ARG...]
|
|||||||
request REMOTE METHOD PARAMS send request, print reply
|
request REMOTE METHOD PARAMS send request, print reply
|
||||||
notify REMOTE METHOD PARAMS send notification and exit
|
notify REMOTE METHOD PARAMS send notification and exit
|
||||||
""" % (ovs.util.PROGRAM_NAME, ovs.util.PROGRAM_NAME))
|
""" % (ovs.util.PROGRAM_NAME, ovs.util.PROGRAM_NAME))
|
||||||
ovs.stream.usage("JSON-RPC", True, True)
|
sys.stdout.write(ovs.stream.usage("JSON-RPC") + "\n")
|
||||||
ovs.daemon.usage()
|
ovs.daemon.usage()
|
||||||
sys.stdout.write("""
|
sys.stdout.write("""
|
||||||
Other options:
|
Other options:
|
||||||
|
Reference in New Issue
Block a user