]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Database exception causes UnboundLocalError in linuxbridge-agent
authorLi Ma <skywalker.nick@gmail.com>
Fri, 25 Apr 2014 07:37:46 +0000 (00:37 -0700)
committerLi Ma <skywalker.nick@gmail.com>
Sat, 26 Apr 2014 14:04:20 +0000 (07:04 -0700)
commit4539ff26d903174c844d6571533dfe719195e107
treef2928b60e6ce130fbdf2a678abbd7de980f74017
parent1f4df4e52848b76d8919c4856262d47c691f4cca
Database exception causes UnboundLocalError in linuxbridge-agent

When database exception raises from update_device_down,
the linuxbridge-agent doesn't deal with them in a proper way
that causes accessing not-existed local variables.

A straightforward workaround is to set it as None by default
and verify its value then.

Change-Id: I32a9467876a619a7d0ad53ff3d5d95ff977e54f4
Closes-Bug: #1311971
neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py
neutron/tests/unit/linuxbridge/test_lb_neutron_agent.py