]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
ovs-lib: make db_get_map return empty dict on error
authorDan Wendlandt <dan@nicira.com>
Mon, 17 Sep 2012 06:48:19 +0000 (23:48 -0700)
committerDan Wendlandt <dan@nicira.com>
Mon, 17 Sep 2012 06:48:19 +0000 (23:48 -0700)
bug 1050504

this fixes a crash caused when we try to iterate over the return value
of db_get_map

Change-Id: I56640035c3e166ddcc3d23e76be9118604dbeadc

quantum/agent/linux/ovs_lib.py

index 06445449105e591657ce66dd2d6e966535acdd50..9eaa67e30f0cf39addf9a055b09c39fc8726877e 100644 (file)
@@ -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])