From: Sebastian Spaeth Date: Tue, 9 Aug 2011 14:48:43 +0000 (+0200) Subject: python: Really throw an error if search_threads() fails X-Git-Tag: 0.8_rc0~21 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=9562c7d1fb18e77ee2a23f4e4a68125f304690d3;hp=805d737029e2758499bae95cd893f219171e2b00 python: Really throw an error if search_threads() fails In case, search_threads returns an error we are supposed to throw an Exception. But we did not "raise" it, this was an oversight and this commit fixes it. There is still the problem that there is often output to stderr by libnotmuch detailing the xapian error and this is simply printed out. But this requires fixing at the libnotmuch level... Signed-off-by: Sebastian Spaeth --- diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py index 84cf79bb..8f62d18c 100644 --- a/bindings/python/notmuch/database.py +++ b/bindings/python/notmuch/database.py @@ -580,7 +580,7 @@ class Query(object): threads_p = Query._search_threads(self._query) if threads_p is None: - NotmuchError(STATUS.NULL_POINTER) + raise NotmuchError(STATUS.NULL_POINTER) return Threads(threads_p,self)