]> git.notmuchmail.org Git - notmuch/commit
python: fix error handling
authorJustus Winter <4winter@informatik.uni-hamburg.de>
Sun, 22 Jan 2012 13:09:35 +0000 (14:09 +0100)
committerDavid Bremner <bremner@debian.org>
Mon, 23 Jan 2012 11:44:08 +0000 (07:44 -0400)
commit221c7e0b38177f5f1dbf0561580c15e8aaa49004
treeb6c5439e552c6c3068ff38c55ab2c9bf01b21e62
parentffce9b7c25b9b44ec026b67d96e44cae09c99efe
python: fix error handling

Before 3434d1940 the return values of libnotmuch functions were
declared as c_void_p and the code checking for errors compared the
returned value to None, which is the ctypes equivalent of a NULL
pointer.

But said commit wrapped all the data types in python classes and the
semantic changed in a subtle way. If a function returns NULL, the
wrapped python value is falsish, but no longer equal to None.

Backported from master to 0.11.
bindings/python/notmuch/database.py
bindings/python/notmuch/filename.py
bindings/python/notmuch/message.py
bindings/python/notmuch/tag.py
bindings/python/notmuch/thread.py