Do not use str() on exceptions (#46950)

This commit is contained in:
Martin Krizek 2018-11-09 07:59:30 +01:00 committed by GitHub
parent 2436aa1a4e
commit a80c25cbd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 76 additions and 66 deletions

View file

@ -238,7 +238,7 @@ class GalaxyAPI(object):
done = (data.get('next_link', None) is None)
return results
except Exception as error:
raise AnsibleError("Failed to download the %s list: %s" % (what, str(error)))
raise AnsibleError("Failed to download the %s list: %s" % (what, to_native(error)))
@g_connect
def search_roles(self, search, **kwargs):