Re: [PATCH v2 0/6] Make notmuch_database_{open, create} return status codes
authorAustin Clements <amdragon@MIT.EDU>
Thu, 3 May 2012 00:23:51 +0000 (20:23 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:46:53 +0000 (09:46 -0800)
08/cbdc6fe27b97d66dcaa0a082fd19387efd14a1 [new file with mode: 0644]

diff --git a/08/cbdc6fe27b97d66dcaa0a082fd19387efd14a1 b/08/cbdc6fe27b97d66dcaa0a082fd19387efd14a1
new file mode 100644 (file)
index 0000000..a47ae6c
--- /dev/null
@@ -0,0 +1,104 @@
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id E7ECE431FAF\r
+       for <notmuch@notmuchmail.org>; Wed,  2 May 2012 17:23:56 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id fTAMlJCSxLMQ for <notmuch@notmuchmail.org>;\r
+       Wed,  2 May 2012 17:23:55 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU\r
+       [18.7.68.36])\r
+       by olra.theworths.org (Postfix) with ESMTP id 79826431FAE\r
+       for <notmuch@notmuchmail.org>; Wed,  2 May 2012 17:23:55 -0700 (PDT)\r
+X-AuditID: 12074424-b7fae6d000000906-6a-4fa1d01aa58e\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+       by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id CC.B2.02310.A10D1AF4; Wed,  2 May 2012 20:23:54 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q430NriG027903; \r
+       Wed, 2 May 2012 20:23:54 -0400\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q430Npl6004860\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Wed, 2 May 2012 20:23:53 -0400 (EDT)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1SPjpn-0006wx-F5; Wed, 02 May 2012 20:23:51 -0400\r
+Date: Wed, 2 May 2012 20:23:51 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>\r
+Subject: Re: [PATCH v2 0/6] Make notmuch_database_{open, create} return\r
+       status codes\r
+Message-ID: <20120503002351.GZ2704@mit.edu>\r
+References: <1335651473-19652-1-git-send-email-amdragon@mit.edu>\r
+       <1335803138-24024-1-git-send-email-amdragon@mit.edu>\r
+       <m2ipge9z95.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <m2ipge9z95.fsf@guru.guru-group.fi>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFmpkleLIzCtJLcpLzFFi42IRYrdT15W6sNDf4PoUE4vrN2cyW7xZOY/V\r
+       gcnj8NeFLB7PVt1iDmCK4rJJSc3JLEst0rdL4Mr4dPs+e8Ek9oo9XRYNjAdYuxg5OSQETCTa\r
+       m/cwQthiEhfurWfrYuTiEBLYxygxd+YXdghnPaPE6VszmEGqhAROMEkceVUAkVjCKHF8wVqg\r
+       URwcLAIqEttfuoHUsAloSGzbvxxsqghQ+EHberBtzALSEt9+NzOBlAsLhEkc3MIBEuYV0JZY\r
+       9nsC1K65jBLNZ34yQyQEJU7OfMIC0aslcePfS7BekDnL/4H1cgoYSCy9tJcdxBYFWjXl5Da2\r
+       CYxCs5B0z0LSPQuhewEj8ypG2ZTcKt3cxMyc4tRk3eLkxLy81CJdc73czBK91JTSTYzgkHZR\r
+       2cHYfEjpEKMAB6MSDy9z1EJ/IdbEsuLK3EOMkhxMSqK8804AhfiS8lMqMxKLM+KLSnNSiw8x\r
+       SnAwK4nwqrUB5XhTEiurUovyYVLSHCxK4rwaWu/8hATSE0tSs1NTC1KLYLIyHBxKErxl54Ea\r
+       BYtS01Mr0jJzShDSTBycIMN5gIangtTwFhck5hZnpkPkTzEqSonzeoEkBEASGaV5cL2wlPOK\r
+       URzoFWHedJAqHmC6gut+BTSYCWhwvvk8kMEliQgpqQZGozuxzsGN7513h/Uwmn9n+L6e+/Cu\r
+       K63Tg0t2ndskv7bs2O3WBx99rG8arEsU0QwseJ11sYyNS+f0R443s3+6hkqyPfxq5nym0zNz\r
+       zqz4tgk71U9t0nz/52mc3wMP2X82RZMlrI+Vyax4d+eM23ndAJ76n1c9519RU7x0WrShxmXH\r
+       pkkLbhSUKbEUZyQaajEXFScCAJIz8gkUAwAA\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 03 May 2012 00:23:57 -0000\r
+\r
+Quoth Tomi Ollila on May 02 at 10:08 pm:\r
+> On Mon, Apr 30 2012, Austin Clements <amdragon@MIT.EDU> wrote:\r
+> \r
+> > Relative to v1, this makes notmuch_database_open and\r
+> > notmuch_database_create gracefully handle a NULL out-argument and adds\r
+> > documentation of the possible error return values from these two\r
+> > functions.  Patches 3 and on have not changed.\r
+> \r
+> LGTM. \r
+> \r
+> One question though:\r
+> \r
+> In bindings/python/notmuch/database.py class Database functions\r
+> create() and open() have the following last lines:\r
+> \r
+> +        if status != STATUS.SUCCESS:\r
+> +            raise NotmuchError(status)\r
+> +        self._db = db\r
+> +        return status\r
+> \r
+> What is the point returning 'status' in the only case the\r
+> value is STATUS.SUCCESS -- is some caller interested on this ?\r
+\r
+This was for consistency with other methods (e.g., begin_atomic also\r
+only ever returns STATUS.SUCCESS).\r