(cherry picked from commit 01e7f44e0d)
pull/39445/head
Brian Coca 8 years ago committed by Matt Davis
parent 05f04c173c
commit 86663c8060

@ -0,0 +1,2 @@
bugfixes:
- dont emit empty error due to \n https://github.com/ansible/ansible/pull/39019

@ -104,7 +104,10 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
(stdout, stderr) = sp.communicate()
path = to_native(path)
err = to_native(stderr or "") + "\n"
err = to_native(stderr or "")
if err and not err.endswith('\n'):
err += '\n'
if sp.returncode != 0:
raise AnsibleError("Inventory script (%s) had an execution error: %s " % (path, err))

Loading…
Cancel
Save