diff options
author | Ed Leafe <ed@leafe.com> | 2011-01-27 13:52:10 -0600 |
---|---|---|
committer | Ed Leafe <ed@leafe.com> | 2011-01-27 13:52:10 -0600 |
commit | a495294ccc40a868b79144085da38196759f699c (patch) | |
tree | 67974ae6568c5ebbd14ce24c51724fdc1596b8d1 | |
parent | bc94ab2278c592a944a3bc9e4aa4c3e9e491f23c (diff) | |
download | nova-a495294ccc40a868b79144085da38196759f699c.tar.gz nova-a495294ccc40a868b79144085da38196759f699c.tar.xz nova-a495294ccc40a868b79144085da38196759f699c.zip |
Fixed formatting issues in current codebase.
-rw-r--r-- | nova/service.py | 5 | ||||
-rw-r--r-- | nova/tests/test_localization.py | 2 | ||||
-rw-r--r-- | nova/utils.py | 4 | ||||
-rw-r--r-- | nova/virt/xenapi/vm_utils.py | 2 |
4 files changed, 7 insertions, 6 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) diff --git a/nova/tests/test_localization.py b/nova/tests/test_localization.py index a546b3e72..0368ac016 100644 --- a/nova/tests/test_localization.py +++ b/nova/tests/test_localization.py @@ -65,7 +65,7 @@ class LocalizationTestCase(test.TestCase): inner = inner_all.replace("%%", "").replace("%(", "") # Filter out the single '%' operators inner = single_pat.sub("", inner) - # Within the remaining content, count % + # Within the remaining content, count % fmtCount = inner.count("%") if fmtCount > 1: inner_first = inner_all.splitlines()[0] diff --git a/nova/utils.py b/nova/utils.py index f71a4d880..5f5225289 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -215,8 +215,8 @@ def get_my_linklocal(interface): raise exception.Error(_("Link Local address is not found.:%s") % if_str) except Exception as ex: - raise exception.Error(_("Couldn't get Link Local IP of %s :%s") - % (interface, ex)) + raise exception.Error(_("Couldn't get Link Local IP of %(interface)s" + " :%(ex)s") % locals()) def to_global_ipv6(prefix, mac): diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py index 4afd28dd8..4bbd522c1 100644 --- a/nova/virt/xenapi/vm_utils.py +++ b/nova/virt/xenapi/vm_utils.py @@ -640,7 +640,7 @@ def with_vdi_attached_here(session, vdi, read_only, f): session.get_xenapi().VBD.plug(vbd) LOG.debug(_('Plugging VBD %s done.'), vbd) orig_dev = session.get_xenapi().VBD.get_device(vbd) - LOG.debug(_('VBD %s plugged as %s'), vbd, orig_dev) + LOG.debug(_('VBD %(vbd)s plugged as %(orig_dev)s') % locals()) dev = remap_vbd_dev(orig_dev) if dev != orig_dev: LOG.debug(_('VBD %(vbd)s plugged into wrong dev, ' |