]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Removes an incorrect and unnecessary return
authorMohammad Banikazemi <mb@us.ibm.com>
Tue, 4 Feb 2014 23:04:32 +0000 (18:04 -0500)
committerThomas Goirand <thomas@goirand.fr>
Thu, 13 Mar 2014 07:20:14 +0000 (15:20 +0800)
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
neutron/tests/unit/openvswitch/test_ovs_lib.py

index 55466d22a4a1817b487882d00031f460806932dc..45e672096e0dcaddf1f9689e0c6951a31c4d2aba 100644 (file)
@@ -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])
index 9ec041bb6baa3546658803c46c6e62d0f8b4182c..4950d366481dfffaf6a9270ed356127fc51345c4 100644 (file)
@@ -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: