summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTHEBAULT Julien <julien@thebault.co>2016-12-28 00:57:33 +0100
committerToshio Kuratomi <a.badger@gmail.com>2017-01-04 17:18:28 -0800
commitef64f690543a88a9b1c47c1151af6229e58658d6 (patch)
tree49ba50702a31cc733f3686079965cb713dd96ef4
parent6fc3f400a2e176766ca6dcd76b4883a0a6adb032 (diff)
downloadansible-modules-core-ef64f690543a88a9b1c47c1151af6229e58658d6.tar.gz
Check the command result status in easy_install plugin (#16519)
(cherry picked from ee1dee08b60feb31282b3402b8b6bff30a599d6c)
-rw-r--r--packaging/language/easy_install.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/packaging/language/easy_install.py b/packaging/language/easy_install.py
index 017f6b81..92d362f2 100644
--- a/packaging/language/easy_install.py
+++ b/packaging/language/easy_install.py
@@ -100,6 +100,8 @@ def _is_package_installed(module, name, easy_install, executable_arguments):
executable_arguments = executable_arguments + ['--dry-run']
cmd = '%s %s %s' % (easy_install, ' '.join(executable_arguments), name)
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)