diff options
Diffstat (limited to 'trunk/src/glsa-check')
| -rw-r--r-- | trunk/src/glsa-check/glsa-check | 3 | ||||
| -rw-r--r-- | trunk/src/glsa-check/glsa.py | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/trunk/src/glsa-check/glsa-check b/trunk/src/glsa-check/glsa-check index 71e7b06..62e4449 100644 --- a/trunk/src/glsa-check/glsa-check +++ b/trunk/src/glsa-check/glsa-check @@ -308,6 +308,7 @@ if mode == "test": if mode == "mail": import portage_mail, socket from StringIO import StringIO + from email.mime.text import MIMEText # color doesn't make any sense for mail nocolor() @@ -342,7 +343,7 @@ if mode == "mail": continue myfd = StringIO() myglsa.dump(outstream=myfd) - myattachments.append(str(myfd.getvalue())) + myattachments.append(MIMEText(str(myfd.getvalue()), _charset="utf8")) myfd.close() mymessage = portage_mail.create_message(myfrom, myrecipient, mysubject, summary, myattachments) diff --git a/trunk/src/glsa-check/glsa.py b/trunk/src/glsa-check/glsa.py index 60588d0..5aeb7fe 100644 --- a/trunk/src/glsa-check/glsa.py +++ b/trunk/src/glsa-check/glsa.py @@ -237,7 +237,8 @@ def getText(node, format): if format == "strip": rValue = rValue.strip(" \n\t") rValue = re.sub("[\s]{2,}", " ", rValue) - return str(rValue) + # Hope that the utf conversion doesn't break anything else + return rValue.encode("utf_8") def getMultiTagsText(rootnode, tagname, format): """ |
