From 3d89dbd8c535d1e1879ea3db76a8c116f9356990 Mon Sep 17 00:00:00 2001 From: Eli Qiao Date: Thu, 6 Aug 2015 16:50:52 +0800 Subject: [PATCH] Fix wrong exception usage in cinder exception classes We need to use message instead of msg_fmt if we want to pass a message format to Base CinderException. Closes-Bug: #1482128 Change-Id: Ib3d29e5f23a6eb2cbd3aed191d9d042dfc3022e0 --- cinder/exception.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cinder/exception.py b/cinder/exception.py index efaf1b3f0..f351decaf 100644 --- a/cinder/exception.py +++ b/cinder/exception.py @@ -644,7 +644,7 @@ class QoSSpecsInUse(CinderException): class KeyManagerError(CinderException): - msg_fmt = _("key manager error: %(reason)s") + message = _("key manager error: %(reason)s") class ManageExistingInvalidReference(CinderException): @@ -684,15 +684,15 @@ ObjectFieldInvalid = obj_exc.ObjectFieldInvalid class VolumeGroupNotFound(CinderException): - msg_fmt = _('Unable to find Volume Group: %(vg_name)s') + message = _('Unable to find Volume Group: %(vg_name)s') class VolumeGroupCreationFailed(CinderException): - msg_fmt = _('Failed to create Volume Group: %(vg_name)s') + message = _('Failed to create Volume Group: %(vg_name)s') class VolumeDeviceNotFound(CinderException): - msg_fmt = _('Volume device not found at %(device)s.') + message = _('Volume device not found at %(device)s.') # Driver specific exceptions -- 2.45.2