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 [] existing_members = pool.split(',') if pool else []
members_to_delete = copy.copy(existing_members) members_to_delete = copy.copy(existing_members)
pool_subnet_id = None pool_subnet_id = None
pool_subnet_cidr = None
for member in members: for member in members:
# NOTE(froyo): in order to keep sync with Octavia DB, we raise # NOTE(froyo): in order to keep sync with Octavia DB, we raise
# not supporting exceptions as soon as posible, considering the # 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 This function deals with updating the References of Logical Switch
in LB and addition of LB to LS. in LB and addition of LB to LS.
""" """
ovn_ls = None
commands = [] commands = []
if not network_id and not subnet_id: if not network_id and not subnet_id:
return commands return commands
@ -653,7 +654,6 @@ class OvnProviderHelper():
LOG.warning('Subnet %s not found while trying to ' LOG.warning('Subnet %s not found while trying to '
'fetch its data.', subnet_id) 'fetch its data.', subnet_id)
ls_name = None ls_name = None
ovn_ls = None
if ls_name: if ls_name:
try: try:
@ -667,7 +667,6 @@ class OvnProviderHelper():
'not found in OVN NBDB. Exiting.', 'not found in OVN NBDB. Exiting.',
{'ls': ls_name, 'lb': ovn_lb.name}) {'ls': ls_name, 'lb': ovn_lb.name})
return commands return commands
ovn_ls = None
ls_refs = ovn_lb.external_ids.get(ovn_const.LB_EXT_IDS_LS_REFS_KEY) ls_refs = ovn_lb.external_ids.get(ovn_const.LB_EXT_IDS_LS_REFS_KEY)
if ls_refs: if ls_refs: