mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Merge pull request #192 from pierg75/handle-exception-wrong-config
handle a exception when the configuration is not correct
This commit is contained in:
commit
858fda7765
1 changed files with 8 additions and 1 deletions
|
|
@ -20,9 +20,16 @@ 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]
|
||||||
|
|
||||||
|
try:
|
||||||
|
config_a, config_b = all_storages[a_name], all_storages[b_name]
|
||||||
|
except KeyError as e:
|
||||||
|
raise CliError('Pair {}: Storage {} not found. These are the '
|
||||||
|
'configured storages: {}'
|
||||||
|
.format(pair_name, str(e), list(all_storages)))
|
||||||
|
|
||||||
all_collections = dict(collections_for_pair(
|
all_collections = dict(collections_for_pair(
|
||||||
general['status_path'], a_name, b_name, pair_name,
|
general['status_path'], a_name, b_name, pair_name,
|
||||||
all_storages[a_name], all_storages[b_name], pair_options
|
config_a, config_b, pair_options
|
||||||
))
|
))
|
||||||
|
|
||||||
# spawn one worker less because we can reuse the current one
|
# spawn one worker less because we can reuse the current one
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue