From fcf901e62071f6d34d398e91da8eb86f4dccbea4 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Wed, 31 Dec 2014 14:19:42 +0100 Subject: [PATCH] Show original error message --- vdirsyncer/cli/utils.py | 3 ++- vdirsyncer/storage/singlefile.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vdirsyncer/cli/utils.py b/vdirsyncer/cli/utils.py index e95f4a7..211e0ba 100644 --- a/vdirsyncer/cli/utils.py +++ b/vdirsyncer/cli/utils.py @@ -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) diff --git a/vdirsyncer/storage/singlefile.py b/vdirsyncer/storage/singlefile.py index f1cd8b0..a993362 100644 --- a/vdirsyncer/storage/singlefile.py +++ b/vdirsyncer/storage/singlefile.py @@ -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