test-jsonrpc: Help option doesn't work.
authorEthan Jackson <ethan@nicira.com>
Mon, 26 Sep 2011 23:12:33 +0000 (16:12 -0700)
committerEthan Jackson <ethan@nicira.com>
Mon, 26 Sep 2011 23:12:33 +0000 (16:12 -0700)
The test-jsonrpc.py script didn't understand the "-h" option and
threw an exception when "--help" was supplied.

tests/test-jsonrpc.py

index 781f1f4..9da3bd2 100644 (file)
@@ -166,7 +166,7 @@ def main(argv):
         sys.exit(1)
 
     for key, value in options:
-        if key in ['h', '--help']:
+        if key in ['-h', '--help']:
             usage()
         elif not ovs.daemon.parse_opt(key, value):
             sys.stderr.write("%s: unhandled option %s\n"
@@ -212,7 +212,7 @@ usage: %s [OPTIONS] COMMAND [ARG...]
   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, True)
+    ovs.stream.usage("JSON-RPC", True, True)
     ovs.daemon.usage()
     sys.stdout.write("""
 Other options: