]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/python/notmuch/message.py
emacs: Add new option notmuch-search-hide-excluded
[notmuch] / bindings / python / notmuch / message.py
index d242097a8299eff8885db7c93a64e9b3b1de8b27..e71dbe3e9933011d334d3ed18990d6fa2844693d 100644 (file)
@@ -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):