On Sat, 23 Jul 2011 14:36:02 +0100, Patrick Totzke wrote:
> I hope the patch I send is correctly formated, I'm still fumbling with
> git send-email and the --in-reply-to option.
> Anyhow, forgive my language, of course I didn't mean to be condescending in 
> any
> way by calling these prints garbage! It's just that it's highly unusual and 
> very
> 'non-pythonic' that a module directly prints to stderr instead of raising 
> exceptions
> and if you work directly with a curseslike interface on a terminal these
> errormessages litter my screen.

Hi,
1) I fixed the lack of throwing a NotmuchError when search_threads()
failed. This was a bug.

2) Taking over stderr and capturing it in a temporary file whenever we
create a query sounds incredibly hackish to me. It also potentially has
side-effects that I cannot even judge (we might be using stderr for
something completely different).

IMHO, libnotmuch should be modified to not directly print to stderr
but to provide a string with a detailed error message together with it's
status value. This would be the proper way to deal with it, even if it
means a bit more complexity in the notmuch binary.

Sebastian

Attachment: pgpQ4Dup3eKZi.pgp
Description: PGP signature

_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch

Reply via email to