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.
pull/39034/head
Abhijit Menon-Sen 6 years ago
parent a1759b02cd
commit ede1d6158a

@ -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]

Loading…
Cancel
Save