mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-07 22:03:18 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user