From da51fcce9b3bc86f2c6e049910ddd88b7d76f7c8 Mon Sep 17 00:00:00 2001 From: Sverre Rabbelier Date: Thu, 12 Jun 2008 13:23:40 +0200 Subject: [PATCH] Usability enhancement: print help msg on 'stats.py subcmd' Previously, when the user ran 'stats.py author' it would exit without doing anything, now the usual help message is printed instead. --- src/stats.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/stats.py b/src/stats.py index e0507d2..1dbef00 100755 --- a/src/stats.py +++ b/src/stats.py @@ -57,6 +57,10 @@ class Dispatcher(): else: raise DispatchException("Unknown command '" + command + "'.") + # When not specifying a command, throw in the --help switch + if len(argv) == 2: + argv.append("--help") + return func(*argv[2:]) commands = { -- 2.11.4.GIT