Skip to content

Commit 335c8d3

Browse files
committed
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
1 parent 30fdb48 commit 335c8d3

15 files changed

Lines changed: 24 additions & 30 deletions

openstackclient/identity/v2_0/ec2creds.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ def take_action(self, parsed_args):
122122
except Exception as e:
123123
result += 1
124124
LOG.error(_("Failed to delete EC2 credentials with "
125-
"access key '%(access_key)s': %(e)s")
126-
% {'access_key': access_key, 'e': e})
125+
"access key '%(access_key)s': %(e)s"),
126+
{'access_key': access_key, 'e': e})
127127

128128
if result > 0:
129129
total = len(parsed_args.access_keys)

openstackclient/identity/v2_0/endpoint.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ def take_action(self, parsed_args):
102102
except Exception as e:
103103
result += 1
104104
LOG.error(_("Failed to delete endpoint with "
105-
"ID '%(endpoint)s': %(e)s")
106-
% {'endpoint': endpoint, 'e': e})
105+
"ID '%(endpoint)s': %(e)s"),
106+
{'endpoint': endpoint, 'e': e})
107107

108108
if result > 0:
109109
total = len(parsed_args.endpoints)

openstackclient/identity/v2_0/service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ def take_action(self, parsed_args):
114114
except Exception as e:
115115
result += 1
116116
LOG.error(_("Failed to delete service with "
117-
"name or ID '%(service)s': %(e)s")
118-
% {'service': service, 'e': e})
117+
"name or ID '%(service)s': %(e)s"),
118+
{'service': service, 'e': e})
119119

120120
if result > 0:
121121
total = len(parsed_args.services)

openstackclient/identity/v3/consumer.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ def take_action(self, parsed_args):
7373
except Exception as e:
7474
result += 1
7575
LOG.error(_("Failed to delete consumer with name or "
76-
"ID '%(consumer)s': %(e)s")
77-
% {'consumer': i, 'e': e})
76+
"ID '%(consumer)s': %(e)s"), {'consumer': i, 'e': e})
7877

7978
if result > 0:
8079
total = len(parsed_args.consumer)

openstackclient/identity/v3/credential.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ def take_action(self, parsed_args):
9999
except Exception as e:
100100
result += 1
101101
LOG.error(_("Failed to delete credentials with "
102-
"ID '%(credential)s': %(e)s")
103-
% {'credential': i, 'e': e})
102+
"ID '%(credential)s': %(e)s"),
103+
{'credential': i, 'e': e})
104104

105105
if result > 0:
106106
total = len(parsed_args.credential)

openstackclient/identity/v3/domain.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ def take_action(self, parsed_args):
111111
except Exception as e:
112112
result += 1
113113
LOG.error(_("Failed to delete domain with name or "
114-
"ID '%(domain)s': %(e)s")
115-
% {'domain': i, 'e': e})
114+
"ID '%(domain)s': %(e)s"), {'domain': i, 'e': e})
116115

117116
if result > 0:
118117
total = len(parsed_args.domain)

openstackclient/identity/v3/ec2creds.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ def take_action(self, parsed_args):
140140
except Exception as e:
141141
result += 1
142142
LOG.error(_("Failed to delete EC2 credentials with "
143-
"access key '%(access_key)s': %(e)s")
144-
% {'access_key': i, 'e': e})
143+
"access key '%(access_key)s': %(e)s"),
144+
{'access_key': i, 'e': e})
145145

146146
if result > 0:
147147
total = len(parsed_args.access_key)

openstackclient/identity/v3/endpoint.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ def take_action(self, parsed_args):
122122
except Exception as e:
123123
result += 1
124124
LOG.error(_("Failed to delete endpoint with "
125-
"ID '%(endpoint)s': %(e)s")
126-
% {'endpoint': i, 'e': e})
125+
"ID '%(endpoint)s': %(e)s"), {'endpoint': i, 'e': e})
127126

128127
if result > 0:
129128
total = len(parsed_args.endpoint)

openstackclient/identity/v3/federation_protocol.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ def take_action(self, parsed_args):
102102
except Exception as e:
103103
result += 1
104104
LOG.error(_("Failed to delete federation protocol "
105-
"with name or ID '%(protocol)s': %(e)s")
106-
% {'protocol': i, 'e': e})
105+
"with name or ID '%(protocol)s': %(e)s"),
106+
{'protocol': i, 'e': e})
107107

108108
if result > 0:
109109
total = len(parsed_args.federation_protocol)

openstackclient/identity/v3/identity_provider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ def take_action(self, parsed_args):
115115
except Exception as e:
116116
result += 1
117117
LOG.error(_("Failed to delete identity providers with "
118-
"name or ID '%(provider)s': %(e)s")
119-
% {'provider': i, 'e': e})
118+
"name or ID '%(provider)s': %(e)s"),
119+
{'provider': i, 'e': e})
120120

121121
if result > 0:
122122
total = len(parsed_args.identity_provider)

0 commit comments

Comments
 (0)