Handle log message interpolation by the logger in compute/

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: Ib7b5fb5f794026fc8a84260c4803afea321a9cf5
Closes-Bug: #1596829
This commit is contained in:
Gábor Antal
2017-02-13 18:41:24 +01:00
parent 0c42c88d88
commit 1c91e9828d
4 changed files with 7 additions and 10 deletions

@ -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)