diff --git a/tester.py b/tester.py index 2b5a79442d6771617f9fa8bf9fedc73292f83afc..f5ca0a6654d356284c9d9d75605af9a40d49dfea 100755 --- a/tester.py +++ b/tester.py @@ -154,6 +154,7 @@ class Tester(): if not hostname: log('Failed to get hostname (required to send email).') return 1 + hostname = hostname.decode('utf-8') recipients = utils.get_conf('EMAIL_ADMINS') if not recipients: log('No recipients defined for email sending. Set a value for EMAIL_ADMINS.') @@ -181,7 +182,7 @@ Content-transfer-encoding: utf-8 %(log_content)s''' % dict( boundary=boundary, - hostname=hostname.decode('utf-8'), + hostname=hostname, recipients=recipients, status='OK' if exit_code == 0 else 'KO', date=now.strftime('%Y-%m-%d %H:%M:%S'),