From 27c2f6097968bfaf2299619b8b0b3f35a4044cae Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sat, 7 Apr 2018 19:17:03 +0300 Subject: [PATCH] print usage in manage script --- manage-calendars.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/manage-calendars.py b/manage-calendars.py index 6073c89..f6ac4d3 100644 --- a/manage-calendars.py +++ b/manage-calendars.py @@ -30,8 +30,11 @@ def parse_args(): 'remove', help='remove calendar') parser_remove.add_argument( 'id', action='store', help='calendar id to remove') - - return parser.parse_args() + + args = parser.parse_args() + if args.command is None: + parser.print_usage() + return args def load_config():