From 335c8d3ef3e5d1112a90d2efa267e5f00a2c5357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Antal?= Date: Mon, 13 Feb 2017 17:36:56 +0100 Subject: Handle log message interpolation by the logger in identity/ According to OpenStack Guideline[1], logged string message should be interpolated by the logger. [1]: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages Change-Id: I1d6588093616099a9eef0947c09e038b9e53493a Related-Bug: #1596829 --- openstackclient/identity/v2_0/ec2creds.py | 4 ++-- openstackclient/identity/v2_0/endpoint.py | 4 ++-- openstackclient/identity/v2_0/service.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'openstackclient/identity/v2_0') diff --git a/openstackclient/identity/v2_0/ec2creds.py b/openstackclient/identity/v2_0/ec2creds.py index 2572c4f0..0bc48322 100644 --- a/openstackclient/identity/v2_0/ec2creds.py +++ b/openstackclient/identity/v2_0/ec2creds.py @@ -122,8 +122,8 @@ class DeleteEC2Creds(command.Command): except Exception as e: result += 1 LOG.error(_("Failed to delete EC2 credentials with " - "access key '%(access_key)s': %(e)s") - % {'access_key': access_key, 'e': e}) + "access key '%(access_key)s': %(e)s"), + {'access_key': access_key, 'e': e}) if result > 0: total = len(parsed_args.access_keys) diff --git a/openstackclient/identity/v2_0/endpoint.py b/openstackclient/identity/v2_0/endpoint.py index 7e0751a7..1628e488 100644 --- a/openstackclient/identity/v2_0/endpoint.py +++ b/openstackclient/identity/v2_0/endpoint.py @@ -102,8 +102,8 @@ class DeleteEndpoint(command.Command): except Exception as e: result += 1 LOG.error(_("Failed to delete endpoint with " - "ID '%(endpoint)s': %(e)s") - % {'endpoint': endpoint, 'e': e}) + "ID '%(endpoint)s': %(e)s"), + {'endpoint': endpoint, 'e': e}) if result > 0: total = len(parsed_args.endpoints) diff --git a/openstackclient/identity/v2_0/service.py b/openstackclient/identity/v2_0/service.py index f70f0fa9..80f2d72a 100644 --- a/openstackclient/identity/v2_0/service.py +++ b/openstackclient/identity/v2_0/service.py @@ -114,8 +114,8 @@ class DeleteService(command.Command): except Exception as e: result += 1 LOG.error(_("Failed to delete service with " - "name or ID '%(service)s': %(e)s") - % {'service': service, 'e': e}) + "name or ID '%(service)s': %(e)s"), + {'service': service, 'e': e}) if result > 0: total = len(parsed_args.services) -- cgit v1.2.1