diff --git a/vdirsyncer/cli/.tasks.py.un~ b/vdirsyncer/cli/.tasks.py.un~ new file mode 100644 index 0000000..2a0227a Binary files /dev/null and b/vdirsyncer/cli/.tasks.py.un~ differ diff --git a/vdirsyncer/cli/tasks.py b/vdirsyncer/cli/tasks.py index 0feb31f..5e08fcc 100644 --- a/vdirsyncer/cli/tasks.py +++ b/vdirsyncer/cli/tasks.py @@ -20,10 +20,13 @@ def sync_pair(wq, pair_name, collections_to_sync, general, all_pairs, a_name, b_name, pair_options = all_pairs[pair_name] - all_collections = dict(collections_for_pair( - general['status_path'], a_name, b_name, pair_name, - all_storages[a_name], all_storages[b_name], pair_options - )) + try: + all_collections = dict(collections_for_pair( + general['status_path'], a_name, b_name, pair_name, + all_storages[a_name], all_storages[b_name], pair_options + )) + except KeyError: + raise CliError('Could not find \"{}\" or \"{}\"\n'.format(a_name,b_name)) # spawn one worker less because we can reuse the current one new_workers = -1