summaryrefslogtreecommitdiffstats
path: root/nova/service.py
diff options
context:
space:
mode:
authorEd Leafe <ed@leafe.com>2011-01-28 00:19:12 +0000
committerTarmac <>2011-01-28 00:19:12 +0000
commitf8f96f3bf97be6fbfd7af3879a9877865d5eaae9 (patch)
tree0def984837fc092fe7fe1d83fce8de5e47c0a74a /nova/service.py
parentd4f77e1c9eaad19f2a917081737840f9e52dac13 (diff)
parentc679e64d13a9ff8643d20316d3a96ed5fc27e0ca (diff)
downloadnova-f8f96f3bf97be6fbfd7af3879a9877865d5eaae9.tar.gz
nova-f8f96f3bf97be6fbfd7af3879a9877865d5eaae9.tar.xz
nova-f8f96f3bf97be6fbfd7af3879a9877865d5eaae9.zip
Added a test that checks for localized strings in the source code that contain position-based string formatting placeholders. If found, an exception message is generated that summarizes the problem, as well as the location of the problematic code. This will prevent future trunk commits from adding localized strings that cannot be properly translated.
Diffstat (limited to 'nova/service.py')
-rw-r--r--nova/service.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/service.py b/nova/service.py
index 2c30997f2..59648adf2 100644
--- a/nova/service.py
+++ b/nova/service.py
@@ -157,8 +157,9 @@ class Service(object):
report_interval = FLAGS.report_interval
if not periodic_interval:
periodic_interval = FLAGS.periodic_interval
- logging.audit(_("Starting %s node (version %s)"), topic,
- version.version_string_with_vcs())
+ vcs_string = version.version_string_with_vcs()
+ logging.audit(_("Starting %(topic)s node (version %(vcs_string)s)")
+ % locals())
service_obj = cls(host, binary, topic, manager,
report_interval, periodic_interval)