This will marginally simplify a future patch.
self.socket.close()
-def usage(name, active, passive):
- print
- if active:
- print("Active %s connection methods:" % name)
- print(" unix:FILE "
- "Unix domain socket named FILE")
-
- if passive:
- print("Passive %s connection methods:" % name)
- print(" punix:FILE "
- "listen on Unix domain socket FILE")
+def usage(name):
+ return """
+Active %s connection methods:
+ unix:FILE Unix domain socket named FILE
+
+Passive %s connection methods:
+ punix:FILE Listen on Unix domain socket FILE""" % (name, name)
request REMOTE METHOD PARAMS send request, print reply
notify REMOTE METHOD PARAMS send notification and exit
""" % (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()
sys.stdout.write("""
Other options: