From: KIYOHIRO ADACHI Date: Fri, 7 Mar 2014 09:31:26 +0000 (+0900) Subject: Add conversion types in some strings X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=7f643ca464194067c70d86efdc262daa9d2d3a92;p=openstack-build%2Fcinder-build.git Add conversion types in some strings Some strings have no conversion types for 'String Formatting Operations'. Change-Id: I2c6176954643a93898ff2d06d686793fb0977458 Closes-Bug: #1289230 --- diff --git a/cinder/brick/iscsi/iscsi.py b/cinder/brick/iscsi/iscsi.py index 23fa37ff1..754b9e122 100644 --- a/cinder/brick/iscsi/iscsi.py +++ b/cinder/brick/iscsi/iscsi.py @@ -177,7 +177,7 @@ class TgtAdm(TargetAdmin): f.write(volume_conf) f.close() LOG.debug(_('Created volume path %(vp)s,\n' - 'content: %(vc)%') + 'content: %(vc)s') % {'vp': volume_path, 'vc': volume_conf}) old_persist_file = None diff --git a/cinder/volume/drivers/ibm/storwize_svc/helpers.py b/cinder/volume/drivers/ibm/storwize_svc/helpers.py index 20d7cdd7e..8b65154cb 100644 --- a/cinder/volume/drivers/ibm/storwize_svc/helpers.py +++ b/cinder/volume/drivers/ibm/storwize_svc/helpers.py @@ -339,7 +339,7 @@ class StorwizeHelpers(object): found = True if not found: LOG.warning(_('unmap_vol_from_host: No mapping of volume ' - '%(vol_name)s to host %(host) found.') % + '%(vol_name)s to host %(host)s found.') % {'vol_name': volume_name, 'host': host_name}) # We now know that the mapping exists diff --git a/cinder/volume/drivers/nexenta/iscsi.py b/cinder/volume/drivers/nexenta/iscsi.py index 5db016911..7635ea606 100644 --- a/cinder/volume/drivers/nexenta/iscsi.py +++ b/cinder/volume/drivers/nexenta/iscsi.py @@ -177,7 +177,7 @@ class NexentaISCSIDriver(driver.ISCSIDriver): # pylint: disable=R0921 try: self.delete_snapshot({'volume_name': volume, 'name': snapshot}) except nexenta.NexentaException as exc: - LOG.warning(_('Cannot delete snapshot %(origin): %(exc)s'), + LOG.warning(_('Cannot delete snapshot %(origin)s: %(exc)s'), {'origin': origin, 'exc': exc}) def create_cloned_volume(self, volume, src_vref): diff --git a/cinder/zonemanager/drivers/brocade/brcd_fc_san_lookup_service.py b/cinder/zonemanager/drivers/brocade/brcd_fc_san_lookup_service.py index 9eb02a3e1..5c05b52b2 100644 --- a/cinder/zonemanager/drivers/brocade/brcd_fc_san_lookup_service.py +++ b/cinder/zonemanager/drivers/brocade/brcd_fc_san_lookup_service.py @@ -132,7 +132,7 @@ class BrcdFCSanLookupService(FCSanLookupService): "fabric %s") % fabric_ip) except Exception as e: msg = _("SSH connection failed " - "for %(fabric) with error: %(err)" + "for %(fabric)s with error: %(err)s" ) % {'fabric': fabric_ip, 'err': e} LOG.error(msg) raise exception.FCSanLookupServiceException(message=msg) @@ -212,7 +212,7 @@ class BrcdFCSanLookupService(FCSanLookupService): stdin, stdout, stderr = self.client.exec_command(cmd) switch_data = stdout.readlines() except paramiko.SSHException as e: - msg = (_("SSH Command failed with error '%(err)r' " + msg = (_("SSH Command failed with error '%(err)s' " "'%(command)s'") % {'err': e, 'command': cmd}) LOG.error(msg)