mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 07:17:40 -02:30
Fixing up some unicode issues
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
import logging
|
||||
|
||||
from django.utils.encoding import smart_text
|
||||
from django.core.mail.backends.smtp import EmailBackend
|
||||
|
||||
class CustomEmailBackend(EmailBackend):
|
||||
@@ -19,9 +20,9 @@ class CustomEmailBackend(EmailBackend):
|
||||
sender_parameter = "sender"
|
||||
|
||||
def format_body(self, body):
|
||||
body_actual = "{} #{} had status {} on Ansible Tower, view details at {}\n\n".format(body['friendly_name'],
|
||||
body['id'],
|
||||
body['status'],
|
||||
body['url'])
|
||||
body_actual = smart_text("{} #{} had status {} on Ansible Tower, view details at {}\n\n".format(body['friendly_name'],
|
||||
body['id'],
|
||||
body['status'],
|
||||
body['url']))
|
||||
body_actual += pprint.pformat(body, indent=4)
|
||||
return body_actual
|
||||
|
||||
Reference in New Issue
Block a user