mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
tests for InventoryModule error conditions (#31381)
* tests for InventoryModule error conditions * modified unicode in tests to ahear to Ansible best practices * flake8 fixes
This commit is contained in:
parent
68f177d381
commit
cf938e9992
2 changed files with 105 additions and 2 deletions
|
@ -80,8 +80,7 @@ class InventoryModule(BaseInventoryPlugin):
|
|||
(stdout, stderr) = sp.communicate()
|
||||
|
||||
path = to_native(path)
|
||||
if stderr:
|
||||
err = to_native(stderr) + "\n"
|
||||
err = to_native(stderr or "") + "\n"
|
||||
|
||||
if sp.returncode != 0:
|
||||
raise AnsibleError("Inventory script (%s) had an execution error: %s " % (path, err))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue