Brought picoforce driver up to speed with 0x06130001 and 0x07200000
[hooke.git] / hooke / hooke.py
index 07d5d5ae75114113dbc5b148afaa22731472dd37..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__)
@@ -186,6 +186,3 @@ def main():
         hooke = runner.run(hooke)
     finally:
         hooke.close()
-
-if __name__ == '__main__':
-    main()