mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Change error formatting to not use **locals()
This commit is contained in:
parent
eece22723e
commit
ee01369591
1 changed files with 6 additions and 5 deletions
|
|
@ -147,8 +147,6 @@ def storage_instance_from_config(config, description=None):
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
env = os.environ
|
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
|
force_delete=status_name in force_delete
|
||||||
)
|
)
|
||||||
except StorageEmpty as e:
|
except StorageEmpty as e:
|
||||||
side = 'a' if e.empty_storage is a else 'b'
|
|
||||||
storage = e.empty_storage
|
|
||||||
raise CliError(
|
raise CliError(
|
||||||
'{collection_description}: Storage "{side}" ({storage}) was '
|
'{collection_description}: Storage "{side}" ({storage}) was '
|
||||||
'completely emptied. Use "--force-delete {status_name}" to '
|
'completely emptied. Use "--force-delete {status_name}" to '
|
||||||
'synchronize that emptyness to the other side, or delete the '
|
'synchronize that emptyness to the other side, or delete the '
|
||||||
'status by yourself to restore the items from the non-empty '
|
'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)
|
save_status(general['status_path'], status_name, status)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue