From 68a3d73368b30deabf74132ef82cc28b74974864 Mon Sep 17 00:00:00 2001 From: Benjamin Bohard Date: Tue, 8 Mar 2022 16:17:58 +0100 Subject: [PATCH] Print usage when called without options --- setup_main_tex_file.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup_main_tex_file.py b/setup_main_tex_file.py index 35d2381..2e9f737 100755 --- a/setup_main_tex_file.py +++ b/setup_main_tex_file.py @@ -438,7 +438,10 @@ def main(): parser_compile.set_defaults(func=tex_compile) args = parser.parse_args() - args.func(args) + if hasattr(args, 'func'): + args.func(args) + else: + parser.print_usage() class Outline: