mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Revert "Skip collections during discovery, don't abort"
This reverts commit e35479b080.
This commit is contained in:
parent
eb9974f18d
commit
a1a9cfef80
1 changed files with 13 additions and 17 deletions
|
|
@ -201,10 +201,10 @@ def _handle_collection_not_found(config, collection, e=None):
|
||||||
except NotImplementedError as e:
|
except NotImplementedError as e:
|
||||||
cli_logger.error(e)
|
cli_logger.error(e)
|
||||||
|
|
||||||
raise exceptions.CollectionNotFound(
|
raise CliError('Unable to find or create collection "{collection}" for '
|
||||||
'Unable to find or create collection "{collection}" for storage '
|
'storage "{storage}". Please create the collection '
|
||||||
'"{storage}". Please create the collection yourself.'
|
'yourself.'.format(collection=collection,
|
||||||
.format(collection=collection, storage=storage_name))
|
storage=storage_name))
|
||||||
|
|
||||||
|
|
||||||
def _collections_for_pair_impl(status_path, name_a, name_b, pair_name,
|
def _collections_for_pair_impl(status_path, name_a, name_b, pair_name,
|
||||||
|
|
@ -227,20 +227,16 @@ def _collections_for_pair_impl(status_path, name_a, name_b, pair_name,
|
||||||
|
|
||||||
for collection in collections:
|
for collection in collections:
|
||||||
try:
|
try:
|
||||||
try:
|
a_args = a_discovered[collection]
|
||||||
a_args = a_discovered[collection]
|
except KeyError:
|
||||||
except KeyError:
|
a_args = _handle_collection_not_found(config_a, collection)
|
||||||
a_args = _handle_collection_not_found(config_a, collection)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
b_args = b_discovered[collection]
|
b_args = b_discovered[collection]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
b_args = _handle_collection_not_found(config_b, collection)
|
b_args = _handle_collection_not_found(config_b, collection)
|
||||||
except exceptions.CollectionNotFound as e:
|
|
||||||
cli_logger.warning('Skipping collection {}: {}'
|
yield collection, (a_args, b_args)
|
||||||
.format(collection, str(e)))
|
|
||||||
else:
|
|
||||||
yield collection, (a_args, b_args)
|
|
||||||
|
|
||||||
|
|
||||||
def _validate_general_section(general_config):
|
def _validate_general_section(general_config):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue