Updated main

This commit is contained in:
Dimitris Zlatanidis 2023-03-15 21:52:40 +02:00
parent 77c0d9c1dc
commit c39e01d67c

View file

@ -653,10 +653,11 @@ class Argparse(Configs):
def main():
args = sys.argv
args.pop(0)
usage = Usage()
# Fixes the IndexError.
if '' in args:
Usage().help(1)
usage.help(1)
argparse = Argparse(args)
@ -704,7 +705,7 @@ def main():
argparse.check_for_flags(args[0])
arguments[args[0]]()
except (KeyError, IndexError):
Usage().help(1)
usage.help(1)
if __name__ == '__main__':