mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-18 06:41:04 +00:00
protect another portion against None name
This commit is contained in:
@@ -410,11 +410,12 @@ def main():
|
||||
out += out_pip
|
||||
err += err_pip
|
||||
|
||||
for pkg in name:
|
||||
is_present = _is_present(pkg, version, out.split())
|
||||
if (state == 'present' and not is_present) or (state == 'absent' and is_present):
|
||||
changed = True
|
||||
break
|
||||
if pkg:
|
||||
for pkg in name:
|
||||
is_present = _is_present(pkg, version, out.split())
|
||||
if (state == 'present' and not is_present) or (state == 'absent' and is_present):
|
||||
changed = True
|
||||
break
|
||||
module.exit_json(changed=changed, cmd=freeze_cmd, stdout=out, stderr=err)
|
||||
|
||||
if requirements or has_vcs:
|
||||
|
||||
Reference in New Issue
Block a user