Fix help message when too many arguments are passed to Hooke.
[hooke.git] / hooke / hooke.py
index 859d634a2053ca5b9562887a07cb18763bf1b0b1..6b4975738849b45fb0d89e3c525d5652f6e376f9 100644 (file)
@@ -163,9 +163,9 @@ def main():
         help='Add a command line Hooke command to run.')
     options,arguments = p.parse_args()
     if len(arguments) > 0:
-        print >> sys.stderr, 'Too many arguments to %s: %d > 0' \
-            % (sys.argv[0], len(arguments))
-        print >> sys.stderr, p.help()
+        print >> sys.stderr, 'More than 0 arguments to %s: %s' \
+            % (sys.argv[0], arguments)
+        p.print_help(sys.stderr)
         sys.exit(1)
 
     hooke = Hooke(debug=__debug__)