Fix new pylint errors

Fix the following new errors detected by pylint 3.2.0.
 - possibly-used-before-assignment

Change-Id: I06a5695e7e3ad3d645b81771cc1248046fdf8d68
(cherry picked from commit b0bfda27d0)
This commit is contained in:
Fernando Royo 2024-05-14 17:29:54 +02:00
parent 6816d67dad
commit d48cefda03
2 changed files with 2 additions and 2 deletions

View File

@ -391,6 +391,7 @@ class OvnProviderDriver(driver_base.ProviderDriver):
existing_members = pool.split(',') if pool else []
members_to_delete = copy.copy(existing_members)
pool_subnet_id = None
pool_subnet_cidr = None
for member in members:
# NOTE(froyo): in order to keep sync with Octavia DB, we raise
# not supporting exceptions as soon as posible, considering the

View File

@ -638,6 +638,7 @@ class OvnProviderHelper():
This function deals with updating the References of Logical Switch
in LB and addition of LB to LS.
"""
ovn_ls = None
commands = []
if not network_id and not subnet_id:
return commands
@ -653,7 +654,6 @@ class OvnProviderHelper():
LOG.warning('Subnet %s not found while trying to '
'fetch its data.', subnet_id)
ls_name = None
ovn_ls = None
if ls_name:
try:
@ -667,7 +667,6 @@ class OvnProviderHelper():
'not found in OVN NBDB. Exiting.',
{'ls': ls_name, 'lb': ovn_lb.name})
return commands
ovn_ls = None
ls_refs = ovn_lb.external_ids.get(ovn_const.LB_EXT_IDS_LS_REFS_KEY)
if ls_refs: