]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix inconsistency of if/return logic in attributes.py
authorJohn Davidge <jodavidg@cisco.com>
Mon, 27 Jul 2015 10:39:59 +0000 (11:39 +0100)
committerJohn Davidge <jodavidg@cisco.com>
Mon, 27 Jul 2015 10:41:43 +0000 (11:41 +0100)
commitcc8a3792a88a0579f8621a87f643d6016c131874
tree38723f032ced1b36e16c4d9e2237b1eef6cfe450
parente95bc6f5be6b0d3bcf0677e515660f6b972163fe
Fix inconsistency of if/return logic in attributes.py

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.

This patch standardises the usage around the shorter version.

Change-Id: Idc9e6eb1852d2565906fc2c8e8a7c0a63bc1a0dd
Closes-Bug: 1478512
neutron/api/v2/attributes.py