pylint: ensure variables are initialized

pylint doesn't know that some functions may terminate execution, like,
AnsibleModule's fail_json, and assume that, depending on the code path,
some variables may not be initialized when used.

This change ensure that variables are always initialized independent of
the code path.
This commit is contained in:
Rafael Guterres Jeffman
2024-05-22 10:22:15 -03:00
parent f53ca3ad39
commit 52241fe233
3 changed files with 8 additions and 6 deletions

View File

@@ -1605,6 +1605,8 @@ def main():
res_find = find_dnsrecord(ansible_module, zone_name, name)
cmds = []
if state == 'present':
cmds = define_commands_for_present_state(
ansible_module, zone_name, entry, res_find)