From 403a683e7019612baf407167ca1fd9362cf4779d Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Thu, 16 Jun 2016 02:24:39 +0200 Subject: [PATCH] Cosmetic improvements --- tests/cli/test_sync.py | 2 +- vdirsyncer/cli/tasks.py | 2 +- vdirsyncer/cli/utils.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/cli/test_sync.py b/tests/cli/test_sync.py index 0143da2..41a6364 100644 --- a/tests/cli/test_sync.py +++ b/tests/cli/test_sync.py @@ -234,7 +234,7 @@ def test_invalid_pairs_as_cli_arg(tmpdir, runner): result = runner.invoke(['sync', 'foobar/d']) assert result.exception - assert 'pair foobar: collection d not found' in result.output.lower() + assert 'pair foobar: collection "d" not found' in result.output.lower() def test_multiple_pairs(tmpdir, runner): diff --git a/vdirsyncer/cli/tasks.py b/vdirsyncer/cli/tasks.py index 4dca815..1303892 100644 --- a/vdirsyncer/cli/tasks.py +++ b/vdirsyncer/cli/tasks.py @@ -33,7 +33,7 @@ def prepare_pair(wq, pair_name, collections, config, callback, **kwargs): 'Pair {}: Collection {} not found. These are the ' 'configured collections:\n{}' .format(pair_name, - coerce_native(collection_name), + json.dumps(collection_name), list(all_collections))) new_workers += 1 diff --git a/vdirsyncer/cli/utils.py b/vdirsyncer/cli/utils.py index 2b7f59f..6562891 100644 --- a/vdirsyncer/cli/utils.py +++ b/vdirsyncer/cli/utils.py @@ -271,7 +271,7 @@ def _handle_collection_not_found(config, collection, e=None): cli_logger.error('{}No collection {} found for storage {}.' .format('{}\n'.format(e) if e else '', - coerce_native(collection), storage_name)) + json.dumps(collection), storage_name)) if click.confirm('Should vdirsyncer attempt to create it?'): storage_type = config['type']