From b78d4ba2641a08001444534806999d9170b8be91 Mon Sep 17 00:00:00 2001 From: Clemens Vasters Date: Thu, 15 Feb 2024 10:04:34 +0100 Subject: [PATCH] print help w/o cmd Signed-off-by: Clemens Vasters --- avrotize/avrotize.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/avrotize/avrotize.py b/avrotize/avrotize.py index f4e34de..e8bf91f 100644 --- a/avrotize/avrotize.py +++ b/avrotize/avrotize.py @@ -29,8 +29,9 @@ def main(): x2a_parser.add_argument('--namespace', type=str, help='Namespace for the Avro schema', required=False) args = parser.parse_args() - - if args.command == 'p2a': + if args.command is None: + parser.print_help() + elif args.command == 'p2a': avro_schema_path = args.avsc proto_file_path = args.proto convert_proto_to_avro(proto_file_path, avro_schema_path)