diff --git a/vdirsyncer/cli.py b/vdirsyncer/cli.py index 978eff8..f0dea12 100644 --- a/vdirsyncer/cli.py +++ b/vdirsyncer/cli.py @@ -33,6 +33,7 @@ def load_config(fname, pair_options=('collections', 'conflict_resolution')): get_options = lambda s: dict(parse_options(c.items(s), section=s)) + general = None pairs = {} storages = {} @@ -55,6 +56,12 @@ def load_config(fname, pair_options=('collections', 'conflict_resolution')): cli_logger.error( 'Unknown section in {}: {}'.format(fname, section)) + if not general: + cli_logger.error('Unable to find general section. You should copy the ' + 'example config from the repository and edit it.') + cli_logger.error('https://github.com/untitaker/vdirsyncer') + sys.exit(1) + return general, pairs, storages