0 argument bugfix

This commit is contained in:
trueold89 2024-03-25 07:17:17 +03:00
parent 41422cce40
commit ddc5e0c72f
Signed by: trueold89
GPG Key ID: C122E85DD49E6B30
1 changed files with 2 additions and 0 deletions

View File

@ -70,6 +70,8 @@ class Args(object):
""" """
Checks the arguments Checks the arguments
""" """
if len(self.__arguments) == 0:
raise TypeError(lang.errors["usage"])
if len(self.__arguments) != 2 and self.__arguments[0] not in Arg.HELP.value: if len(self.__arguments) != 2 and self.__arguments[0] not in Arg.HELP.value:
raise TypeError(lang.errors["usage"]) raise TypeError(lang.errors["usage"])
if self.__arguments[0] in Arg.HELP.value: if self.__arguments[0] in Arg.HELP.value: