X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=sidebyside;f=bindings%2Fpython%2Fnotmuch%2Fmessage.py;h=6e32b5f7ada2d825d4cd6c23403f6b6b1271691f;hb=6682b4e686b7972883626c9b0f941ae4bf02dedb;hp=d242097a8299eff8885db7c93a64e9b3b1de8b27;hpb=3a747e714c3e99a725619d09d832b9ac683733fe;p=notmuch diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py index d242097a..6e32b5f7 100644 --- a/bindings/python/notmuch/message.py +++ b/bindings/python/notmuch/message.py @@ -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):