From 1e72d1ea549aff20c273d68bd5325851e5ac4c00 Mon Sep 17 00:00:00 2001 From: Matthew Gilliard Date: Fri, 5 Dec 2014 13:13:42 +0000 Subject: [PATCH] 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 --- nova/api/openstack/compute/contrib/attach_interfaces.py | 2 +- nova/compute/manager.py | 4 ++-- nova/tests/unit/test_iptables_network.py | 2 +- nova/tests/unit/virt/xenapi/test_xenapi.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nova/api/openstack/compute/contrib/attach_interfaces.py b/nova/api/openstack/compute/contrib/attach_interfaces.py index 6a35760305e9..bd67a0b527d0 100644 --- a/nova/api/openstack/compute/contrib/attach_interfaces.py +++ b/nova/api/openstack/compute/contrib/attach_interfaces.py @@ -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) diff --git a/nova/compute/manager.py b/nova/compute/manager.py index f240709e654c..c0bf9a4d3caf 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -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, diff --git a/nova/tests/unit/test_iptables_network.py b/nova/tests/unit/test_iptables_network.py index bd20b101bbfa..870d5a021f30 100644 --- a/nova/tests/unit/test_iptables_network.py +++ b/nova/tests/unit/test_iptables_network.py @@ -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") diff --git a/nova/tests/unit/virt/xenapi/test_xenapi.py b/nova/tests/unit/virt/xenapi/test_xenapi.py index d58f4fbfb10d..67f1857a8da5 100644 --- a/nova/tests/unit/virt/xenapi/test_xenapi.py +++ b/nova/tests/unit/virt/xenapi/test_xenapi.py @@ -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):