From 663eadfb2b7facbae7ba2cf6fe579355e1cc5e02 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanino Date: Tue, 24 Jun 2014 19:40:36 -0400 Subject: [PATCH] Misuse of i18n log translation to output error message I found a misuse of i18n log translation for error message in "cinder/volume/drivers/lvm.py'. The "%s' can not be translated. In this case, the "message' must be i18ning and then the "message" should be output using LOG.error(). Change-Id: I4495522d337764dc28186225f4594a227ac3e555 Signed-off-by: Mitsuhiro Tanino Closes-Bug: 1334334 --- cinder/volume/drivers/lvm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cinder/volume/drivers/lvm.py b/cinder/volume/drivers/lvm.py index e3f539c1082..dc98a78703c 100644 --- a/cinder/volume/drivers/lvm.py +++ b/cinder/volume/drivers/lvm.py @@ -573,9 +573,9 @@ class LVMISCSIDriver(LVMVolumeDriver, driver.ISCSIDriver): try: (vg for vg in vg_list if vg['name'] == dest_vg).next() except StopIteration: - message = ("Destination Volume Group %s does not exist" % + message = (_("Destination Volume Group %s does not exist") % dest_vg) - LOG.error(_('%s'), message) + LOG.error(message) return false_ret helper = utils.get_root_helper()