mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Check the command result status in easy_install plugin (#16519)
This commit is contained in:
parent
337ea4d65c
commit
ee1dee08b6
1 changed files with 2 additions and 0 deletions
|
@ -108,6 +108,8 @@ def _is_package_installed(module, name, easy_install, executable_arguments):
|
||||||
executable_arguments = executable_arguments + ['--dry-run']
|
executable_arguments = executable_arguments + ['--dry-run']
|
||||||
cmd = '%s %s %s' % (easy_install, ' '.join(executable_arguments), name)
|
cmd = '%s %s %s' % (easy_install, ' '.join(executable_arguments), name)
|
||||||
rc, status_stdout, status_stderr = module.run_command(cmd)
|
rc, status_stdout, status_stderr = module.run_command(cmd)
|
||||||
|
if rc:
|
||||||
|
module.fail_json(msg=status_stderr)
|
||||||
return not ('Reading' in status_stdout or 'Downloading' in status_stdout)
|
return not ('Reading' in status_stdout or 'Downloading' in status_stdout)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue