]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Enable undefined-loop-variable pylint check
authorAngus Lees <gus@inodes.org>
Wed, 13 Aug 2014 05:42:10 +0000 (15:42 +1000)
committerAngus Lees <gus@inodes.org>
Fri, 28 Nov 2014 00:40:41 +0000 (11:40 +1100)
commit4f1129190bfaa9a43e61c70728cddfb5ab83c21f
tree180ddad5709b9c229c2500adc377a6464d423329
parentef86198181649f13da9692b6a2b339e36901aa27
Enable undefined-loop-variable pylint check

This required a trivial refactor of two existing cases in the codebase.

These two cases were perfectly correct, but the check uncovered a 3rd
case which was a real bug (fixed separately).  The new versions also
make it clear that if the loop fails to break early then the 'result' is
None (and thus an error) and not simply the last element.  On balance,
it's probably worth enforcing this small inconvenience to coding style.

Change-Id: I780a95241f1454c6886d91f980eb9ada7678a119
Related-Bug: #1362466
.pylintrc
neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py
neutron/services/loadbalancer/drivers/haproxy/cfg.py