From 65db3dea811bd5ac967f834428be26583ea0b6b0 Mon Sep 17 00:00:00 2001 From: Venkata Harshavardhan Reddy Allu Date: Wed, 8 Aug 2018 14:12:09 +0530 Subject: Fix UnboundLocalError in 'odl_utils.py'#L420 When an exception is raised from find_compute in #L411, the compute variable is not created and it raises an error < UnboundLocalError: local variable 'compute' referenced before assignment > at #L420. Change-Id: I48cff435dc3a03b30b7a8d24aa605611e30938de Signed-off-by: Venkata Harshavardhan Reddy Allu --- sfc/lib/odl_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sfc/lib/odl_utils.py b/sfc/lib/odl_utils.py index ea9f1bc2..a60fb557 100644 --- a/sfc/lib/odl_utils.py +++ b/sfc/lib/odl_utils.py @@ -411,6 +411,7 @@ def check_vnffg_deletion(odl_ip, odl_port, ovs_logger, neutron_ports, compute = find_compute(compute_client_name, compute_nodes) except Exception as e: logger.debug("There was an error getting the compute: %s" % e) + return False retries_counter = retries -- cgit 1.2.3-korg