]> git.notmuchmail.org Git - notmuch/commit
python: fix Message.get_header
authorJustus Winter <4winter@informatik.uni-hamburg.de>
Thu, 17 May 2012 16:14:58 +0000 (18:14 +0200)
committerJustus Winter <4winter@informatik.uni-hamburg.de>
Thu, 17 May 2012 16:23:11 +0000 (18:23 +0200)
commit8f667be2aca7d903a82344490045dff4110f68d7
tree5f01c0b538b232e4bfcd94c1f80dab2872d2f1f1
parent8e3faa7f18d9ca87a77834d76f4b8db95669252b
python: fix Message.get_header

8dc8495010057202b725ac029831c03f4e3ab6bd introduced a bug, if the
requested header is not set the underlying notmuch function returns an
empty string that also made the expression true resulting in an
exception being raised. Partly revert the commit to fix this
issue. Testing for equality with None is correct in this case since
the restype of the function Message._get_header is c_char_p so NULL
pointers are in fact converted to None in this case.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
bindings/python/notmuch/message.py