Check length of args

This commit is contained in:
Matej Focko 2019-11-22 20:17:02 +01:00
parent 55807f2fdd
commit 1b527a7a6c

View file

@ -36,7 +36,7 @@ COMMANDS = {
def main():
if sys.argv[1] not in COMMANDS:
if len(sys.argv) < 2 or sys.argv[1] not in COMMANDS:
print("Invalid command")
exit(2)