Skip to content

Commit f945cf7

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Handle log message interpolation by the logger in compute/"
2 parents 7aa7b3a + 1c91e98 commit f945cf7

4 files changed

Lines changed: 7 additions & 10 deletions

File tree

openstackclient/compute/v2/aggregate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ def take_action(self, parsed_args):
128128
except Exception as e:
129129
result += 1
130130
LOG.error(_("Failed to delete aggregate with name or "
131-
"ID '%(aggregate)s': %(e)s")
132-
% {'aggregate': a, 'e': e})
131+
"ID '%(aggregate)s': %(e)s"),
132+
{'aggregate': a, 'e': e})
133133

134134
if result > 0:
135135
total = len(parsed_args.aggregate)

openstackclient/compute/v2/flavor.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def take_action(self, parsed_args):
171171
except Exception as e:
172172
msg = _("Failed to add project %(project)s access to "
173173
"flavor: %(e)s")
174-
LOG.error(msg % {'project': parsed_args.project, 'e': e})
174+
LOG.error(msg, {'project': parsed_args.project, 'e': e})
175175
if parsed_args.property:
176176
try:
177177
flavor.set_keys(parsed_args.property)
@@ -208,8 +208,7 @@ def take_action(self, parsed_args):
208208
except Exception as e:
209209
result += 1
210210
LOG.error(_("Failed to delete flavor with name or "
211-
"ID '%(flavor)s': %(e)s")
212-
% {'flavor': f, 'e': e})
211+
"ID '%(flavor)s': %(e)s"), {'flavor': f, 'e': e})
213212

214213
if result > 0:
215214
total = len(parsed_args.flavor)
@@ -412,7 +411,7 @@ def take_action(self, parsed_args):
412411
except Exception as e:
413412
msg = _("Failed to get access projects list "
414413
"for flavor '%(flavor)s': %(e)s")
415-
LOG.error(msg % {'flavor': parsed_args.flavor, 'e': e})
414+
LOG.error(msg, {'flavor': parsed_args.flavor, 'e': e})
416415

417416
flavor = resource_flavor._info.copy()
418417
flavor.update({

openstackclient/compute/v2/keypair.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ def take_action(self, parsed_args):
106106
except Exception as e:
107107
result += 1
108108
LOG.error(_("Failed to delete key with name "
109-
"'%(name)s': %(e)s")
110-
% {'name': n, 'e': e})
109+
"'%(name)s': %(e)s"), {'name': n, 'e': e})
111110

112111
if result > 0:
113112
total = len(parsed_args.name)

openstackclient/compute/v2/service.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ def take_action(self, parsed_args):
5050
except Exception as e:
5151
result += 1
5252
LOG.error(_("Failed to delete compute service with "
53-
"ID '%(service)s': %(e)s")
54-
% {'service': s, 'e': e})
53+
"ID '%(service)s': %(e)s"), {'service': s, 'e': e})
5554

5655
if result > 0:
5756
total = len(parsed_args.service)

0 commit comments

Comments
 (0)