Fixed formatting issues in current codebase.

This commit is contained in:
Ed Leafe 2011-01-27 13:52:10 -06:00
parent bc94ab2278
commit a495294ccc
4 changed files with 7 additions and 6 deletions

View File

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

View File

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

View File

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

View File

@ -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, '