From: Scott DAngelo Date: Wed, 10 Jul 2013 22:00:02 +0000 (+0000) Subject: cinder.api: Replace 'locals()' with explicit values X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=8c1cf3db3dd38767b2f78123a235fbf47460bf43;p=openstack-build%2Fcinder-build.git cinder.api: Replace 'locals()' with explicit values Help bring source code into compliance with the Cinder Style Commandments: https://github.com/openstack/cinder/blob/master/HACKING.rst This change covers all affected source in the cinder api module, specifically: cinder/api/contrib/volume_actions.py Partially fixes: bug #1190758 Change-Id: I2134e69b70a5a5132847168f60b4d192bdf0b536 --- diff --git a/cinder/api/contrib/volume_actions.py b/cinder/api/contrib/volume_actions.py index ede1b7048..63d45246b 100644 --- a/cinder/api/contrib/volume_actions.py +++ b/cinder/api/contrib/volume_actions.py @@ -89,7 +89,10 @@ class VolumeActionsController(wsgi.Controller): if instance_uuid and host_name: msg = _("Invalid request to attach volume to an " "instance %(instance_uuid)s and a " - "host %(host_name)s simultaneously") % (locals()) + "host %(host_name)s simultaneously") % { + 'instance_uuid': instance_uuid, + 'host_name': host_name, + } raise webob.exc.HTTPBadRequest(explanation=msg) elif instance_uuid is None and host_name is None: msg = _("Invalid request to attach volume to an invalid target")