From: Dan Wendlandt Date: Mon, 17 Sep 2012 06:48:19 +0000 (-0700) Subject: ovs-lib: make db_get_map return empty dict on error X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=8ba098a65acafe4ffde1b51f97f7b6a1b45e6d99;p=openstack-build%2Fneutron-build.git ovs-lib: make db_get_map return empty dict on error bug 1050504 this fixes a crash caused when we try to iterate over the return value of db_get_map Change-Id: I56640035c3e166ddcc3d23e76be9118604dbeadc --- diff --git a/quantum/agent/linux/ovs_lib.py b/quantum/agent/linux/ovs_lib.py index 064454491..9eaa67e30 100644 --- a/quantum/agent/linux/ovs_lib.py +++ b/quantum/agent/linux/ovs_lib.py @@ -179,6 +179,7 @@ class OVSBridge: if output: str = output.rstrip("\n\r") return self.db_str_to_map(str) + return {} def db_get_val(self, table, record, column): output = self.run_vsctl(["get", table, record, column])