From: Eli Qiao Date: Thu, 6 Aug 2015 08:50:52 +0000 (+0800) Subject: Fix wrong exception usage in cinder exception classes X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=3d89dbd8c535d1e1879ea3db76a8c116f9356990;p=openstack-build%2Fcinder-build.git 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 --- 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