1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-07-07 09:50:07 +02:00

fdroid.py: list commands when not giving a right command (I used ./fdroid -h and expected actual info, even if -h is not valid

This commit is contained in:
Tias Guns 2012-03-11 21:09:32 +00:00 committed by Tias Guns
parent d2fa268910
commit ec396c3cc5

6
fdroid
View File

@ -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.