X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=bindings%2Fpython%2Fnotmuch%2Fmessage.py;h=ce8e7181b2743f162843c8f2d387baf3515d3f9c;hb=ff58a06e83379f2b224861082b782bec538f0d2d;hp=a9ded8018489c082ae86888b7b3797f2f5d940b6;hpb=ffe3097e58220d96c7a18b1b6062330551378b82;p=notmuch diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py index a9ded801..ce8e7181 100644 --- a/bindings/python/notmuch/message.py +++ b/bindings/python/notmuch/message.py @@ -427,7 +427,7 @@ class Message(object): header = Message._get_header(self._msg, header) if header == None: raise NotmuchError(STATUS.NULL_POINTER) - return header.decode('UTF-8') + return header.decode('UTF-8', errors='ignore') def get_filename(self): """Returns the file path of the message file @@ -799,7 +799,7 @@ class Message(object): return unicode(self).encode('utf-8') def __unicode__(self): - format = "%(from)s (%(date)s) (%(tags)s)" + format = "%s (%s) (%s)" return format % (self.get_header('from'), self.get_tags(), date.fromtimestamp(self.get_date()),