Fix boxes script when passing no param

This commit is contained in:
Florian Festi 2017-03-09 17:42:37 +01:00
parent cd0d49bf6f
commit 10cad241ef
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ boxes [NAME] [options]
def main():
modules = boxes.generators.getAllGeneratorModules()
del modules['_template']
if sys.argv[1].startswith("--id="):
if len(sys.argv) > 1 and sys.argv[1].startswith("--id="):
del sys.argv[1]
if len(sys.argv) == 1:
printusage()