mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
handle a exception when the configuration is not correct
This commit is contained in:
parent
0a35e27d5d
commit
cde248f887
2 changed files with 7 additions and 4 deletions
BIN
vdirsyncer/cli/.tasks.py.un~
Normal file
BIN
vdirsyncer/cli/.tasks.py.un~
Normal file
Binary file not shown.
|
|
@ -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]
|
a_name, b_name, pair_options = all_pairs[pair_name]
|
||||||
|
|
||||||
all_collections = dict(collections_for_pair(
|
try:
|
||||||
general['status_path'], a_name, b_name, pair_name,
|
all_collections = dict(collections_for_pair(
|
||||||
all_storages[a_name], all_storages[b_name], pair_options
|
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
|
# spawn one worker less because we can reuse the current one
|
||||||
new_workers = -1
|
new_workers = -1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue