mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
Do not use str() on exceptions (#46950)
This commit is contained in:
parent
2436aa1a4e
commit
a80c25cbd9
30 changed files with 76 additions and 66 deletions
|
@ -24,6 +24,7 @@ import getpass
|
|||
from base64 import b64encode
|
||||
from datetime import datetime
|
||||
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.urls import open_url
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
|
||||
|
@ -259,4 +260,4 @@ class CallbackModule(CallbackBase):
|
|||
url_username=self.grafana_user, url_password=self.grafana_password,
|
||||
http_agent=self.http_agent, force_basic_auth=self.force_basic_auth)
|
||||
except Exception as e:
|
||||
self._display.error('Could not submit message to Grafana: %s' % str(e))
|
||||
self._display.error(u'Could not submit message to Grafana: %s' % to_text(e))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue