This commit is contained in:
Jan Grewe 2023-10-22 14:04:44 +02:00
parent dfbbb815db
commit f1dd988bea

View File

@ -138,8 +138,13 @@ def args_check(args, parser, templates):
sys.exit(2)
if args.info and args.template is not None:
templates[args.template].full_info()
sys.exit(0)
if args.template in templates:
templates[args.template].full_info()
sys.exit(0)
else:
print(f"Error using DFGdocs. Template {args.template} is not defined!")
print_templates(templates)
sys.exit(2)
if args.name is None:
print(f"Error using DFGdocs. NAME argument is not defined!")
@ -149,7 +154,7 @@ def args_check(args, parser, templates):
if args.template not in templates:
print(f"Error using DFGdocs. Template {args.template} is not defined!")
print_templates(templates)
sys.exit(0)
sys.exit(2)
def main():