Re: [PATCH v2 0/6] Make notmuch_database_{open, create} return status codes

Subject: Re: [PATCH v2 0/6] Make notmuch_database_{open, create} return status codes

Date: Wed, 02 May 2012 22:08:54 +0300

To: Austin Clements, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Mon, Apr 30 2012, Austin Clements <amdragon@MIT.EDU> wrote:

> Relative to v1, this makes notmuch_database_open and
> notmuch_database_create gracefully handle a NULL out-argument and adds
> documentation of the possible error return values from these two
> functions.  Patches 3 and on have not changed.

LGTM. 

One question though:

In bindings/python/notmuch/database.py class Database functions
create() and open() have the following last lines:

+        if status != STATUS.SUCCESS:
+            raise NotmuchError(status)
+        self._db = db
+        return status

What is the point returning 'status' in the only case the
value is STATUS.SUCCESS -- is some caller interested on this ?

Tomi

Thread: