X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=bindings%2Fpython%2Fnotmuch%2Fmessage.py;h=e71dbe3e9933011d334d3ed18990d6fa2844693d;hp=d242097a8299eff8885db7c93a64e9b3b1de8b27;hb=HEAD;hpb=045f0e455ac94e2393d0d729c9bbdf3459a4860f diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py index d242097a..e71dbe3e 100644 --- a/bindings/python/notmuch/message.py +++ b/bindings/python/notmuch/message.py @@ -46,7 +46,7 @@ import sys class Message(Python3StringMixIn): - """Represents a single Email message + r"""Represents a single Email message Technically, this wraps the underlying *notmuch_message_t* structure. A user will usually not create these objects themselves @@ -482,6 +482,8 @@ class Message(Python3StringMixIn): if status != 0: raise NotmuchError(status) + if value is None or value.value is None: + return None return value.value.decode('utf-8') def get_properties(self, prop="", exact=False):