Fixes multi-line strings with missing spaces

Multi-line concatenated strings are easily given bad spacing:

  "This looks like"
  "it will be OK"    => "This looks likeit will be OK"

This patch fixes those. I don't think it's possible to create
a hacking rule for this as any automated check will generate
too many false positives.

Change-Id: If89007f45d90ca5321336e3623139f9538ac06b8
This commit is contained in:
Matthew Gilliard 2014-12-05 13:13:42 +00:00
parent 8027c2978b
commit 1e72d1ea54
4 changed files with 5 additions and 5 deletions

View File

@ -76,7 +76,7 @@ class InterfaceAttachmentController(object):
raise exc.HTTPForbidden(explanation=e.format_message())
if port_info['port']['device_id'] != server_id:
msg = _("Instance %(instance)s does not have a port with id"
msg = _("Instance %(instance)s does not have a port with id "
"%(port)s") % {'instance': server_id, 'port': port_id}
raise exc.HTTPNotFound(explanation=msg)

View File

@ -178,7 +178,7 @@ timeout_opts = [
cfg.IntOpt("instance_build_timeout",
default=0,
help="Amount of time in seconds an instance can be in BUILD "
"before going into ERROR status."
"before going into ERROR status. "
"Set to 0 to disable."),
cfg.IntOpt("rescue_timeout",
default=0,
@ -198,7 +198,7 @@ running_deleted_opts = [
cfg.StrOpt("running_deleted_instance_action",
default="reap",
help="Action to take if a running deleted instance is detected."
"Valid options are 'noop', 'log', 'shutdown', or 'reap'. "
" Valid options are 'noop', 'log', 'shutdown', or 'reap'. "
"Set to 'noop' to take no action."),
cfg.IntOpt("running_deleted_instance_poll_interval",
default=1800,

View File

@ -233,7 +233,7 @@ class IptablesManagerTestCase(test.NoDBTestCase):
for line in ['*filter',
'COMMIT']:
self.assertTrue(line in new_lines, "One of iptables key lines"
self.assertTrue(line in new_lines, "One of iptables key lines "
"went missing.")
self.assertTrue(len(new_lines) > 4, "No iptables rules added")

View File

@ -2800,7 +2800,7 @@ class XenAPIDom0IptablesFirewallTestCase(stubs.XenAPITestBase):
regex = re.compile('\[0\:0\] -A .* -j ACCEPT -p udp --dport 200:299'
' -s 192.168.99.0/24')
self.assertTrue(len(filter(regex.match, self._out_rules)) > 0,
"Rules were not updated properly."
"Rules were not updated properly. "
"The rule for UDP acceptance is missing")
def test_provider_firewall_rules(self):