From: Eric Harney Date: Wed, 16 Mar 2016 15:08:08 +0000 (-0400) Subject: Fix formatting in vol/snap delete API messages X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=5a78e52f5947ec7b37441226c0a9f03afbbbf907;p=openstack-build%2Fcinder-build.git Fix formatting in vol/snap delete API messages These messages print with incorrect spacing and are shown from cinderclient when running volume and snapshot delete. Change-Id: I81175133baa84b43c71b6ca5bd7a93db7b541d3d --- diff --git a/cinder/volume/api.py b/cinder/volume/api.py index 5bab80545..e539e8c15 100644 --- a/cinder/volume/api.py +++ b/cinder/volume/api.py @@ -390,8 +390,8 @@ class API(base.Base): if not result: status = utils.build_or_str(expected.get('status'), - _(' status must be %s and ')) - msg = _('Volume%s must not be migrating, attached, belong to a ' + _('status must be %s and')) + msg = _('Volume %s must not be migrating, attached, belong to a ' 'consistency group or have snapshots.') % status LOG.info(msg) raise exception.InvalidVolume(reason=msg) @@ -942,8 +942,8 @@ class API(base.Base): result = snapshot.conditional_update({'status': 'deleting'}, expected) if not result: status = utils.build_or_str(expected.get('status'), - _(' status must be %s and ')) - msg = (_('Snapshot%s must not be part of a consistency group.') % + _('status must be %s and')) + msg = (_('Snapshot %s must not be part of a consistency group.') % status) LOG.error(msg) raise exception.InvalidSnapshot(reason=msg)