Unnecessary return statement in ovs_lib
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Low
|
Mohammad Banikazemi |
Bug Description
[openstack-dev] [neutron] unnecessary return statement in ovs_lib
Thu Jan 16 02:48:46 UTC 2014
Came across the following issue while looking at ovs_lib [1]:
The BaseOVS class has the add_bridge() method which after creating an OVS
bridge, returns an OVSBridge object. BaseOVS class is only used by
OVSBridge defined in the same file. OVSBridge has a create() method that
calls the add_bridge() nethod mentioned earlier but do not use the return
value. (See the methods add_bridge and create below.)
What seems odd is the return statement at the end of add_bridge() which is
not used anywhere and doesn't make much sense as far as I can see but I may
be missing something. The OVSBase is never directly used anywhere in
Neutron directory. Of course the return does not do any harm beyond
creating an unused object but it looks to me that it should be removed
unless there is a good reason (or a potential future use case) for it.
class BaseOVS(object):
...
def add_bridge(self, bridge_name):
return OVSBridge(
class OVSBridge(BaseOVS):
...
def create(self):
[1]
https:/
Changed in neutron: | |
status: | New → In Progress |
assignee: | nobody → Mohammad Banikazemi (mb-s) |
Changed in neutron: | |
milestone: | none → icehouse-3 |
importance: | Undecided → Low |
Changed in neutron: | |
status: | Fix Committed → Fix Released |
Changed in neutron: | |
milestone: | icehouse-3 → 2014.1 |
Reviewed: https:/ /review. openstack. org/71142 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=c1eb61b98a3 7a10775affa8451 85388f05e3ceb4
Committed: https:/
Submitter: Jenkins
Branch: master
commit c1eb61b98a37a10 775affa84518538 8f05e3ceb4
Author: Mohammad Banikazemi <email address hidden>
Date: Tue Feb 4 18:04:32 2014 -0500
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: Id53f6fbc8cc6fb 38419e5616a3522 79f1a9b917f
Closes-Bug: #1276367