diff options
author | 2018-08-08 14:12:09 +0530 | |
---|---|---|
committer | 2018-08-08 14:26:54 +0530 | |
commit | 65db3dea811bd5ac967f834428be26583ea0b6b0 (patch) | |
tree | e2e4b0ae35780d6464090e3a4d3714b7f8fadb6b | |
parent | 3e8af7d5eb89224018706fc35775b14744a63f22 (diff) |
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 <venkataharshavardhan_ven@srmuniv.edu.in>
-rw-r--r-- | sfc/lib/odl_utils.py | 1 |
1 files changed, 1 insertions, 0 deletions
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 |