Convert text reports to bytes before writing them

issue7594
review58361002
This commit is contained in:
Sergi Almacellas Abellana committed 2018-08-08 10:33:00 +02:00
1 parent fc1424f83b
commit d6fcb2dce3
1 file changed
+2
+2
View File
@@ -43,6 +43,8 @@ class Action(object):
fp_name = os.path.join(dtemp,
slugify(name) + os.extsep + slugify(type))
if isinstance(data, str):
data = data.encode('utf-8')
with open(fp_name, 'wb') as file_d:
file_d.write(data)
if email_print: