Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yum-cron: don't crash with non-ascii email. BZ 1202680
Previously, we constructed our MIMEText object with the default us-ascii charset, which caused it to encode the unicode string (self.output) with the us-ascii codec. This worked fine as long as the string contained ascii-only chars. However, if yum-cron was run with a language which makes use of non-ascii chars, this would fail and MIMEText would crash. To fix that, we need to tell MIMEText to encode the message with utf-8 instead. However, that also causes the message to be transfer-encoded to base64 which is heavier and uglier, so let's limit that to non-ascii email only.
- Loading branch information