diff --git a/vdirsyncer/cli/utils.py b/vdirsyncer/cli/utils.py index 1a31e66..550577d 100644 --- a/vdirsyncer/cli/utils.py +++ b/vdirsyncer/cli/utils.py @@ -186,6 +186,7 @@ def _discover_from_config(config): def _handle_collection_not_found(config, collection, e=None): storage_name = config.get('instance_name', None) + assert config.setdefault('collection', collection) == collection cli_logger.error('{}No collection {} found for storage {}.' .format('{}\n'.format(e) if e else '', @@ -195,7 +196,7 @@ def _handle_collection_not_found(config, collection, e=None): storage_type = config['type'] cls, config = storage_class_from_config(config) try: - args = cls.create_collection(collection=collection, **config) + args = cls.create_collection(**config) args['type'] = storage_type return args except NotImplementedError as e: