+2007-10-05: Marius Mauch <genone@gentoo.org>
+ * glsa-check: Use UTF-8 strings to avoid EncodeErrors if a GLSA contains
+ non-ascii characters (bug #162493)
+
2007-09-19: Paul Varner <fuzzyray@gentoo.org>
* epkginfo: Fix handling of KEYWORDS="" in an ebuild. (Bug #193108)
* revdep-rebuild: Fix handling of /var/db/pkg when it is a symbolic
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()
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)
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):
"""