Previously,
$ python bin/hooke x
would raise an exception. Now it prints an error message and hooke's
help:
More than 0 arguments to bin/hooke: ['x']
Usage: hooke [options]
...
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__)