]> git.cworth.org Git - notmuch/commitdiff
python: fix unchecked None access in get_property
authorVincent Breitmoser <look@my.amazin.horse>
Mon, 17 Sep 2018 12:49:32 +0000 (14:49 +0200)
committerDavid Bremner <david@tethera.net>
Thu, 20 Sep 2018 00:56:08 +0000 (21:56 -0300)
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