Vincent A <dev@indigo.re> writes:
> In Python bindings, Message.get_property fails with an AttributeError
> when trying to fetch a property that doesn't exist.
> - return value.value.decode('utf-8') if value is not None else None
> + if value is None or value.value is None:
> + return None
> + return value.value.decode('utf-8')
>
Should we be throwing an appropriate exception rather than returning
None? That seems more pythonic to me. In either case we should document
the error handling.
d
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch