Improve StorageEmpty message

This commit is contained in:
Markus Unterwaditzer 2015-10-30 20:13:37 +01:00
parent 98111e7625
commit c090aaa0fe

View file

@ -77,10 +77,11 @@ def handle_cli_error(status_name=None):
cli_logger.critical(e.format_cli()) cli_logger.critical(e.format_cli())
except StorageEmpty as e: except StorageEmpty as e:
cli_logger.error( cli_logger.error(
'{status_name}: Storage "{name}" was completely emptied. Use ' '{status_name}: Storage "{name}" was completely emptied. If you '
'`vdirsyncer sync --force-delete {status_name}` to synchronize ' 'want to delete ALL entries on BOTH sides, then use '
'that emptyness to the other side, or delete the status by ' '`vdirsyncer sync --force-delete {status_name}`. '
'yourself to restore the items from the non-empty side.'.format( 'Otherwise delete the files for {status_name} in your status '
'directory.'.format(
name=e.empty_storage.instance_name, name=e.empty_storage.instance_name,
status_name=status_name status_name=status_name
) )