parent
05f04c173c
commit
86663c8060
2 changed files with 6 additions and 1 deletions
2
changelogs/fragments/fix_spurious_stderr.yml
Normal file
2
changelogs/fragments/fix_spurious_stderr.yml
Normal file
|
@ -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…
Reference in a new issue