From d2f4b63f647da7c0f1bf36858617ef0e71496cff Mon Sep 17 00:00:00 2001 From: haobing1 Date: Fri, 15 Jul 2016 17:54:30 +0800 Subject: [PATCH] Fix string interpolation to delayed to be handled by the logging code String interpolation should be delayed to be handled by the logging code, rather than being done at the point of the logging call. See the oslo i18n guideline. * http://docs.openstack.org/developer/oslo.i18n/guidelines.html Change-Id: I3fa26c1c5c672d5505fa556e03af35318f4774ab Closes-Bug: #1596829 --- cinderclient/api_versions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cinderclient/api_versions.py b/cinderclient/api_versions.py index a74f3af24..6644684b6 100644 --- a/cinderclient/api_versions.py +++ b/cinderclient/api_versions.py @@ -228,7 +228,7 @@ def get_api_version(version_string): version_string = str(version_string) if version_string in DEPRECATED_VERSIONS: LOG.warning("Version %(deprecated_version)s is deprecated, use " - "alternative version %(alternative)s instead." % + "alternative version %(alternative)s instead.", {"deprecated_version": version_string, "alternative": DEPRECATED_VERSIONS[version_string]}) if strutils.is_int_like(version_string):