Fix typo(-ish)

The «if err» test always passed after #cf938e99926 changed the earlier
assignment to always set err to "\n" if stderr was empty, and so every
script plugin (e.g., ec2.py) started to always report an empty ERROR.
This commit is contained in:
Abhijit Menon-Sen 2018-04-19 22:22:41 +05:30
parent a1759b02cd
commit ede1d6158a

View file

@ -121,7 +121,7 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
raise AnsibleError("failed to parse executable inventory script results from {0}: {1}\n{2}".format(path, to_native(e), err))
# if no other errors happened and you want to force displaying stderr, do so now
if err and self.get_option('always_show_stderr'):
if stderr and self.get_option('always_show_stderr'):
self.display.error(msg=to_text(err))
processed = self._cache[cache_key]