From 91b042c521d92c24df98395f569f924ac79a6446 Mon Sep 17 00:00:00 2001 From: Mohammad Banikazemi Date: Tue, 4 Feb 2014 18:04:32 -0500 Subject: [PATCH] Removes an incorrect and unnecessary return The current return statement creates a new object that is not used anywhere and does not provide a functionality Change-Id: Id53f6fbc8cc6fb38419e5616a352279f1a9b917f Closes-Bug: #1276367 --- neutron/agent/linux/ovs_lib.py | 1 - neutron/tests/unit/openvswitch/test_ovs_lib.py | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/neutron/agent/linux/ovs_lib.py b/neutron/agent/linux/ovs_lib.py index 55466d22a..45e672096 100644 --- a/neutron/agent/linux/ovs_lib.py +++ b/neutron/agent/linux/ovs_lib.py @@ -75,7 +75,6 @@ class BaseOVS(object): def add_bridge(self, bridge_name): self.run_vsctl(["--", "--may-exist", "add-br", bridge_name]) - return OVSBridge(bridge_name, self.root_helper) def delete_bridge(self, bridge_name): self.run_vsctl(["--", "--if-exists", "del-br", bridge_name]) diff --git a/neutron/tests/unit/openvswitch/test_ovs_lib.py b/neutron/tests/unit/openvswitch/test_ovs_lib.py index 9ec041bb6..4950d3664 100644 --- a/neutron/tests/unit/openvswitch/test_ovs_lib.py +++ b/neutron/tests/unit/openvswitch/test_ovs_lib.py @@ -37,12 +37,9 @@ class TestBaseOVS(base.BaseTestCase): def test_add_bridge(self): with mock.patch.object(self.ovs, 'run_vsctl') as mock_vsctl: - bridge = self.ovs.add_bridge(self.br_name) - + self.ovs.add_bridge(self.br_name) mock_vsctl.assert_called_with(["--", "--may-exist", "add-br", self.br_name]) - self.assertEqual(bridge.br_name, self.br_name) - self.assertEqual(bridge.root_helper, self.ovs.root_helper) def test_delete_bridge(self): with mock.patch.object(self.ovs, 'run_vsctl') as mock_vsctl: -- 2.45.2