From 18a64d3ab109a69980eac25ca7fe9e905e29cce0 Mon Sep 17 00:00:00 2001 From: Takashi NATSUME Date: Thu, 18 Feb 2016 14:09:12 +0900 Subject: [PATCH] Fix string interpolation at logging call Skip creating the formatted log message if the message is not going to be emitted because of the log level. TrivialFix Change-Id: Ic35b67bc43c77a086409bed57b846f729300d5c0 --- novaclient/api_versions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/novaclient/api_versions.py b/novaclient/api_versions.py index 803f61558..5f7198c0d 100644 --- a/novaclient/api_versions.py +++ b/novaclient/api_versions.py @@ -232,7 +232,7 @@ def get_api_version(version_string): if version_string in DEPRECATED_VERSIONS: LOG.warning( _LW("Version %(deprecated_version)s is deprecated, using " - "alternative version %(alternative)s instead.") % + "alternative version %(alternative)s instead."), {"deprecated_version": version_string, "alternative": DEPRECATED_VERSIONS[version_string]}) version_string = DEPRECATED_VERSIONS[version_string]