python: fix unchecked None access in get_property

This commit is contained in:
Vincent Breitmoser 2018-09-17 14:49:32 +02:00 committed by David Bremner
parent 2fd4e76006
commit 5ae8ae13ba

View 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