From ec396c3cc5fbe5035f5e09e8dbae5d82abba0cec Mon Sep 17 00:00:00 2001 From: Tias Guns Date: Sun, 11 Mar 2012 21:09:32 +0000 Subject: [PATCH] fdroid.py: list commands when not giving a right command (I used ./fdroid -h and expected actual info, even if -h is not valid --- fdroid | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fdroid b/fdroid index 22bcffac..20922475 100755 --- a/fdroid +++ b/fdroid @@ -41,7 +41,11 @@ def main(): command = sys.argv[1] if not command in commands: - print "Command '" + command + "' not recognised" + print "Command '" + command + "' not recognised." + print "" + print "Valid commands are:" + for command in commands: + print " " + command sys.exit(1) # Trick optparse into displaying the right usage when --help is used.