Check length of args
This commit is contained in:
parent
55807f2fdd
commit
1b527a7a6c
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ COMMANDS = {
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if sys.argv[1] not in COMMANDS:
|
if len(sys.argv) < 2 or sys.argv[1] not in COMMANDS:
|
||||||
print("Invalid command")
|
print("Invalid command")
|
||||||
exit(2)
|
exit(2)
|
||||||
|
|
||||||
|
|
Reference in a new issue