← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1478512] [NEW] If/return logic in attributes.py is inconsistent

 

Public bug reported:

In neutron/api/v2/attributes.py some methods use:

if data is None:
    return
return something

Others use:

if data is not None:
    return something

Both have the same effect, but are inconsistent. The usage should be
standardised around the shorter version.

** Affects: neutron
     Importance: Undecided
     Assignee: John Davidge (john-davidge)
         Status: New

** Changed in: neutron
     Assignee: (unassigned) => John Davidge (john-davidge)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1478512

Title:
  If/return logic in attributes.py is inconsistent

Status in neutron:
  New

Bug description:
  In neutron/api/v2/attributes.py some methods use:

  if data is None:
      return
  return something

  Others use:

  if data is not None:
      return something

  Both have the same effect, but are inconsistent. The usage should be
  standardised around the shorter version.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1478512/+subscriptions


Follow ups