From: Tias Guns Date: Sun, 11 Mar 2012 21:09:32 +0000 (+0000) Subject: fdroid.py: list commands when not giving a right command (I used ./fdroid -h and... X-Git-Tag: 0.1~828^2~4 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=ec396c3cc5fbe5035f5e09e8dbae5d82abba0cec;p=fdroidserver.git fdroid.py: list commands when not giving a right command (I used ./fdroid -h and expected actual info, even if -h is not valid --- 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.