Show original error message

This commit is contained in:
Markus Unterwaditzer 2014-12-31 14:19:42 +01:00
parent e76fd29aec
commit fcf901e620
2 changed files with 3 additions and 2 deletions

View file

@ -368,7 +368,8 @@ def storage_instance_from_config(config, create=True):
try:
return cls(**new_config)
except exceptions.CollectionNotFound:
except exceptions.CollectionNotFound as e:
cli_logger.error(str(e))
if create:
_handle_collection_not_found(config, None)
return storage_instance_from_config(config, create=False)

View file

@ -86,7 +86,7 @@ class SingleFileStorage(Storage):
def create_collection(cls, collection, **kwargs):
if collection is not None:
raise ValueError('collection is not a valid argument for {}'
.format(type(self).__name__))
.format(cls.__name__))
checkfile(kwargs['path'], create=True)
return kwargs