stream.py: Make usage() function return a string.
[openvswitch] / python / ovs / stream.py
index 5180642dead01861504fb024e2779d28887aa5d4..3bb0c10fd2b165957b0e320af5c510464ca50e97 100644 (file)
@@ -302,14 +302,10 @@ class PassiveStream(object):
         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)