[PATCH] use notmuch_database_open_verbose
Patrick Totzke
patricktotzke at gmail.com
Sun Mar 13 05:03:20 PDT 2016
As far as I understand the bindings, the returned message is not needed
because the return
value of `Database._open` (line 212) contains information about the type of
error that occurred.
This is passed on two lines below if the open-call was unsuccessful.
The docstrings for this method are not ideal (the mentioned "status"
parameter is actually called "mode") but in terms of functionality it seems
ok.
On 12 March 2016 at 16:33, David Bremner <david at tethera.net> wrote:
> David Bremner <david at tethera.net> writes:
>
> >> - """notmuch_database_open"""
> >> - _open = nmlib.notmuch_database_open
> >> + """notmuch_database_open_verbose"""
> >> + _open = nmlib.notmuch_database_open_verbose
> >> _open.argtypes = [c_char_p, c_uint, POINTER(NotmuchDatabaseP)]
> >> _open.restype = c_uint
> >
> > I expect you probably want to add the new binding, rather than replacing
> > the old one. Otherwise updating the bindings will break all bindings
> > using scripts.
>
> Oh silly me. That's not actually exposed to the python API, so that's
> fine. On the other hand, don't you want to update the argument types and
> do something useful (throw an exception?) with the returned message? As
> it stands you lose information.
>
> d
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20160313/5042e04c/attachment.html>
More information about the notmuch
mailing list