summaryrefslogtreecommitdiff
path: root/nova/service.py
diff options
context:
space:
mode:
authorTakashi NATSUME <natsume.takashi@lab.ntt.co.jp>2016-02-18 12:56:51 +0900
committerTakashi NATSUME <natsume.takashi@lab.ntt.co.jp>2016-03-07 12:05:58 +0900
commit897cb7c2d3f1a50f69ddd2ccbfb00a915feae0fa (patch)
treefb039ca5ecc331cd1e3406341711fb060b1c3fb1 /nova/service.py
parent3781ef8e0cda3781b9e876279d02ce3fd35a4f9b (diff)
downloadnova-897cb7c2d3f1a50f69ddd2ccbfb00a915feae0fa.tar.gz
Fix string interpolations at logging calls
Skip creating the formatted log message if the message is not going to be emitted because of the log level. TrivialFix Change-Id: Iba9f47163a0ac3aca612818272db6d536b238975
Diffstat (limited to 'nova/service.py')
-rw-r--r--nova/service.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/nova/service.py b/nova/service.py
index e019c03009..4ba5d1daf8 100644
--- a/nova/service.py
+++ b/nova/service.py
@@ -145,15 +145,17 @@ def _update_service_ref(this_service, context):
this_service.binary)
if not service:
LOG.error(_LE('Unable to find a service record to update for '
- '%(binary)s on %(host)s') % {
- 'binary': this_service.binary,
- 'host': this_service.host})
+ '%(binary)s on %(host)s'),
+ {'binary': this_service.binary,
+ 'host': this_service.host})
return
if service.version != service_obj.SERVICE_VERSION:
LOG.info(_LI('Updating service version for %(binary)s on '
- '%(host)s from %(old)i to %(new)i') % dict(
- binary=this_service.binary, host=this_service.host,
- old=service.version, new=service_obj.SERVICE_VERSION))
+ '%(host)s from %(old)i to %(new)i'),
+ {'binary': this_service.binary,
+ 'host': this_service.host,
+ 'old': service.version,
+ 'new': service_obj.SERVICE_VERSION})
service.version = service_obj.SERVICE_VERSION
service.save()