]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/python/notmuch/message.py
python: fix unchecked None access in get_property
[notmuch] / bindings / python / notmuch / message.py
index d242097a8299eff8885db7c93a64e9b3b1de8b27..de0fb4151e52e50c3f3eb684932b65820d74cf82 100644 (file)
@@ -482,7 +482,7 @@ class Message(Python3StringMixIn):
         if status != 0:
             raise NotmuchError(status)
 
-        return value.value.decode('utf-8')
+        return value.value.decode('utf-8') if value is not None else None
 
     def get_properties(self, prop="", exact=False):
         """ Get the properties of the message, returning a generator of