From 6956065f0b336c0d4edeba265fae8c9f7cddb736 Mon Sep 17 00:00:00 2001 From: Kun Huang Date: Wed, 4 Sep 2013 18:42:16 +0800 Subject: [PATCH] fix log string in conversion type By using 'grep -rn "%([a-zA-Z_]*) "', we could find all cases of '%(variable)'. And we need add an 's' like '%(variable)s'. Closes-Bug: #1220557 Change-Id: Ib28b7ddc5e5aabe2b82a499d9c242c1982e7f953 --- cinder/volume/drivers/rbd.py | 2 +- cinder/volume/drivers/sheepdog.py | 2 +- cinder/volume/drivers/windows/windows.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cinder/volume/drivers/rbd.py b/cinder/volume/drivers/rbd.py index 3bc580bff..7baeb5c45 100644 --- a/cinder/volume/drivers/rbd.py +++ b/cinder/volume/drivers/rbd.py @@ -612,5 +612,5 @@ class RBDDriver(driver.VolumeDriver): LOG.error(msg) raise exception.VolumeBackendAPIException(data=msg) - LOG.debug(_("Extend volume from %(old_size) to %(new_size)"), + LOG.debug(_("Extend volume from %(old_size)s to %(new_size)s"), {'old_size': old_size, 'new_size': new_size}) diff --git a/cinder/volume/drivers/sheepdog.py b/cinder/volume/drivers/sheepdog.py index 28b07ba45..c68f85a6b 100644 --- a/cinder/volume/drivers/sheepdog.py +++ b/cinder/volume/drivers/sheepdog.py @@ -197,7 +197,7 @@ class SheepdogDriver(driver.VolumeDriver): LOG.error(msg) raise exception.VolumeBackendAPIException(data=msg) - LOG.debug(_("Extend volume from %(old_size) to %(new_size)"), + LOG.debug(_("Extend volume from %(old_size)s to %(new_size)s"), {'old_size': old_size, 'new_size': new_size}) def backup_volume(self, context, backup, backup_service): diff --git a/cinder/volume/drivers/windows/windows.py b/cinder/volume/drivers/windows/windows.py index 24cf40177..9c2738e82 100644 --- a/cinder/volume/drivers/windows/windows.py +++ b/cinder/volume/drivers/windows/windows.py @@ -221,7 +221,7 @@ class WindowsDriver(driver.ISCSIDriver): def extend_volume(self, volume, new_size): """Extend an Existing Volume.""" old_size = volume['size'] - LOG.debug(_("Extended volume from %(old_size) to %(new_size)"), + LOG.debug(_("Extended volume from %(old_size)s to %(new_size)s"), {'old_size': old_size, 'new_size': new_size}) additional_size = (new_size - old_size) * 1024 self.utils.extend(volume['name'], additional_size) -- 2.45.2