]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix OVSBridge.get_port_ofport to handle empty output
authorMaru Newby <marun@redhat.com>
Tue, 1 Jul 2014 23:51:15 +0000 (23:51 +0000)
committerMaru Newby <marun@redhat.com>
Tue, 1 Jul 2014 23:57:20 +0000 (23:57 +0000)
commitfc91e158f202112ae5cc576ad3e3fa0f89deff1e
treeefe4e852ac419ece170e2f6979ef2381243d011f
parent17686c1f24ddf1977bbd930ce94b3e3d76962c5b
Fix OVSBridge.get_port_ofport to handle empty output

Previously ovs_lib.OVSBridge.get_port_ofport() was not handling the
case where db_get_val() was returning None when no output was recieved
from ovs-vsctl.  This patch ensures that the TypeError that results
from this condition is appropriately handled.

Change-Id: I168eb0f2c6f0cb98a3eb3e118972bbaf0383ff89
Partial-bug: #1336172
neutron/agent/linux/ovs_lib.py
neutron/tests/unit/agent/linux/test_ovs_lib.py