Browse Source

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
tags/1.9.0
haobing1 3 years ago
parent
commit
d2f4b63f64
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      cinderclient/api_versions.py

+ 1
- 1
cinderclient/api_versions.py View File

@@ -228,7 +228,7 @@ def get_api_version(version_string):
228 228
     version_string = str(version_string)
229 229
     if version_string in DEPRECATED_VERSIONS:
230 230
         LOG.warning("Version %(deprecated_version)s is deprecated, use "
231
-                    "alternative version %(alternative)s instead." %
231
+                    "alternative version %(alternative)s instead.",
232 232
                    {"deprecated_version": version_string,
233 233
                     "alternative": DEPRECATED_VERSIONS[version_string]})
234 234
     if strutils.is_int_like(version_string):

Loading…
Cancel
Save