diff options
-rw-r--r-- | libbe/comment.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libbe/comment.py b/libbe/comment.py index 17dbab6..a50acfe 100644 --- a/libbe/comment.py +++ b/libbe/comment.py @@ -335,7 +335,7 @@ class Comment (Tree, settings_object.SavedSettingsObject): msg = MIMEBase(maintype, subtype) msg.set_payload(self.body or '') encode_base64(msg) - body = base64.encodebytes(self.body.encode() or b'') + body = base64.encodebytes(self.body.encode() or b'').decode() info = [('uuid', self.uuid), ('alt-id', self.alt_id), ('short-name', self.id.user()), @@ -347,6 +347,7 @@ class Comment (Tree, settings_object.SavedSettingsObject): lines = ['<comment>'] for (k, v) in info: if v is not None: + v = v.decode() if isinstance(v, bytes) else v lines.append(' <%s>%s</%s>' % (k, xml.sax.saxutils.escape(v), k)) for estr in self.extra_strings: |