diff options
author | Tobias Brox <tobias@redpill-linpro.com> | 2019-09-10 13:22:37 +0000 |
---|---|---|
committer | Tobias Brox <tobias@redpill-linpro.com> | 2019-09-10 13:22:37 +0000 |
commit | c20bafb73ff38787d6db18026eaf3d0f20ee69b8 (patch) | |
tree | 5732ffd8c0f532636f3ade0e16c7ef35f8abed86 | |
parent | ee8e04e62e1f105e8f76516b7184e7febe9e1a97 (diff) | |
download | calendar-cli-c20bafb73ff38787d6db18026eaf3d0f20ee69b8.zip |
ref https://github.com/tobixen/calendar-cli/issues/56 fix nice error messages if config is missing
-rwxr-xr-x | calendar-cli.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/calendar-cli.py b/calendar-cli.py index aa15483..65ade03 100755 --- a/calendar-cli.py +++ b/calendar-cli.py @@ -216,7 +216,7 @@ def interactive_config(args, config, remaining_argv): modified = False print("Welcome to the interactive calendar configuration mode") - print("Warning - untested code ahead, raise issues at t-calendar-cli@tobixen.no") + print("Warning - untested code ahead, raise issues at t-calendar-cli@tobixen.no or the github repo") if not config or not hasattr(config, 'keys'): config = {} print("No valid existing configuration found") @@ -898,8 +898,16 @@ def main(): args = parser.parse_args(remaining_argv) if not args.nocaldav: + if not args.calendar_url: + sys.stderr.write(""" +missing mandatory argument calendar_url +Have you set up a config file? Read the doc or ... +... use the --interactive-config option to create a config file +""") + sys.exit(1) caldav_conn = caldav_connect(args) else: + caldav_conn = None if args.ssl_verify_cert == 'no': |