Skip to content

Commit a41abe3

Browse files
committed
Convert unicode to str.
See ietf-tools#1042 - Legacy-Id: 5749
1 parent 66c4a32 commit a41abe3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ietf/nomcom/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ def extract_body(payload):
162162

163163

164164
def parse_email(text):
165+
if isinstance(text, unicode):
166+
text = str(text)
165167
msg = email.message_from_string(text)
166168

167169
# comment
@@ -351,7 +353,7 @@ def create_feedback_email(nomcom, msg):
351353

352354
feedback = Feedback(nomcom=nomcom,
353355
author=addr,
354-
subject=subject,
356+
subject=subject or '',
355357
comments=body)
356358
feedback.save()
357359
return feedback

0 commit comments

Comments
 (0)