Include error exception in AnsibleError

- Use to_native instead of str

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2017-05-19 22:26:55 +05:30 committed by Brian Coca
parent cce133b14f
commit f9b836a901
5 changed files with 11 additions and 9 deletions

View file

@ -66,7 +66,7 @@ class Connection(ConnectionBase):
def _search_executable(executable):
cmd = distutils.spawn.find_executable(executable)
if not cmd:
raise AnsibleError("%s command not found in PATH") % executable
raise AnsibleError("%s command not found in PATH" % executable)
return cmd
def list_zones(self):