From: Tomi Ollila Date: Wed, 2 May 2012 19:08:54 +0000 (+0300) Subject: Re: [PATCH v2 0/6] Make notmuch_database_{open, create} return status codes X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=eb64ea4833716ac18f71bf2802f5fa4d2b1e1564;p=notmuch-archives.git Re: [PATCH v2 0/6] Make notmuch_database_{open, create} return status codes --- diff --git a/0f/17369dc96c504f7f7904d1baea683b9ab2b1d8 b/0f/17369dc96c504f7f7904d1baea683b9ab2b1d8 new file mode 100644 index 000000000..3b51e22da --- /dev/null +++ b/0f/17369dc96c504f7f7904d1baea683b9ab2b1d8 @@ -0,0 +1,74 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 9081C431FAF + for ; Wed, 2 May 2012 12:09:05 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 4Dt8bDhfM6Iq for ; + Wed, 2 May 2012 12:09:04 -0700 (PDT) +Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66]) + by olra.theworths.org (Postfix) with ESMTP id 1F204431FAE + for ; Wed, 2 May 2012 12:09:04 -0700 (PDT) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id 61BE068057; Wed, 2 May 2012 22:08:54 +0300 (EEST) +From: Tomi Ollila +To: Austin Clements , notmuch@notmuchmail.org +Subject: Re: [PATCH v2 0/6] Make notmuch_database_{open, + create} return status codes +In-Reply-To: <1335803138-24024-1-git-send-email-amdragon@mit.edu> +References: <1335651473-19652-1-git-send-email-amdragon@mit.edu> + <1335803138-24024-1-git-send-email-amdragon@mit.edu> +User-Agent: Notmuch/0.12+160~g9c17781 (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Wed, 02 May 2012 19:09:05 -0000 + +On Mon, Apr 30 2012, Austin Clements 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