Merge "Handle log message interpolation by the logger in compute/"

This commit is contained in:
Jenkins 2017-02-14 01:28:54 +00:00 committed by Gerrit Code Review
commit f945cf7b5c
4 changed files with 7 additions and 10 deletions

View File

@ -128,8 +128,8 @@ class DeleteAggregate(command.Command):
except Exception as e:
result += 1
LOG.error(_("Failed to delete aggregate with name or "
"ID '%(aggregate)s': %(e)s")
% {'aggregate': a, 'e': e})
"ID '%(aggregate)s': %(e)s"),
{'aggregate': a, 'e': e})
if result > 0:
total = len(parsed_args.aggregate)

View File

@ -171,7 +171,7 @@ class CreateFlavor(command.ShowOne):
except Exception as e:
msg = _("Failed to add project %(project)s access to "
"flavor: %(e)s")
LOG.error(msg % {'project': parsed_args.project, 'e': e})
LOG.error(msg, {'project': parsed_args.project, 'e': e})
if parsed_args.property:
try:
flavor.set_keys(parsed_args.property)
@ -208,8 +208,7 @@ class DeleteFlavor(command.Command):
except Exception as e:
result += 1
LOG.error(_("Failed to delete flavor with name or "
"ID '%(flavor)s': %(e)s")
% {'flavor': f, 'e': e})
"ID '%(flavor)s': %(e)s"), {'flavor': f, 'e': e})
if result > 0:
total = len(parsed_args.flavor)
@ -412,7 +411,7 @@ class ShowFlavor(command.ShowOne):
except Exception as e:
msg = _("Failed to get access projects list "
"for flavor '%(flavor)s': %(e)s")
LOG.error(msg % {'flavor': parsed_args.flavor, 'e': e})
LOG.error(msg, {'flavor': parsed_args.flavor, 'e': e})
flavor = resource_flavor._info.copy()
flavor.update({

View File

@ -106,8 +106,7 @@ class DeleteKeypair(command.Command):
except Exception as e:
result += 1
LOG.error(_("Failed to delete key with name "
"'%(name)s': %(e)s")
% {'name': n, 'e': e})
"'%(name)s': %(e)s"), {'name': n, 'e': e})
if result > 0:
total = len(parsed_args.name)

View File

@ -50,8 +50,7 @@ class DeleteService(command.Command):
except Exception as e:
result += 1
LOG.error(_("Failed to delete compute service with "
"ID '%(service)s': %(e)s")
% {'service': s, 'e': e})
"ID '%(service)s': %(e)s"), {'service': s, 'e': e})
if result > 0:
total = len(parsed_args.service)