From ee01369591147ff74fddae832acc59bb1be08a2b Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Mon, 19 May 2014 18:36:25 +0200 Subject: [PATCH] Change error formatting to not use **locals() --- vdirsyncer/cli.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/vdirsyncer/cli.py b/vdirsyncer/cli.py index 241a946..c25ab54 100644 --- a/vdirsyncer/cli.py +++ b/vdirsyncer/cli.py @@ -147,8 +147,6 @@ def storage_instance_from_config(config, description=None): sys.exit(1) - - def main(): env = os.environ @@ -298,13 +296,16 @@ def sync_collection(config_a, config_b, pair_name, collection, pair_options, force_delete=status_name in force_delete ) except StorageEmpty as e: - side = 'a' if e.empty_storage is a else 'b' - storage = e.empty_storage raise CliError( '{collection_description}: Storage "{side}" ({storage}) was ' 'completely emptied. Use "--force-delete {status_name}" to ' 'synchronize that emptyness to the other side, or delete the ' 'status by yourself to restore the items from the non-empty ' - 'side.'.format(**locals()) + 'side.'.format( + collection_description=collection_description, + side='a' if e.empty_storage is a else 'b', + storage=e.empty_storage, + status_name=status_name + ) ) save_status(general['status_path'], status_name, status)