mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00: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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user