1 Return-Path: <teythoon@jade-hamburg.de>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id B5722431FBF
\r
6 for <notmuch@notmuchmail.org>; Wed, 9 May 2012 03:23:36 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id qo7ikvcxs8QO for <notmuch@notmuchmail.org>;
\r
16 Wed, 9 May 2012 03:23:36 -0700 (PDT)
\r
17 Received: from mail.cryptobitch.de (cryptobitch.de [88.198.7.68])
\r
18 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 35205431FB6
\r
21 for <notmuch@notmuchmail.org>; Wed, 9 May 2012 03:23:35 -0700 (PDT)
\r
22 Received: from mail.jade-hamburg.de (mail.jade-hamburg.de [85.183.11.228])
\r
23 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
\r
24 (No client certificate requested)
\r
25 by mail.cryptobitch.de (Postfix) with ESMTPSA id 974525885CB
\r
26 for <notmuch@notmuchmail.org>; Wed, 9 May 2012 12:23:33 +0200 (CEST)
\r
27 Received: by mail.jade-hamburg.de (Postfix, from userid 401)
\r
28 id 8A1ECDF2A5; Wed, 9 May 2012 12:23:16 +0200 (CEST)
\r
29 Received: from thinkbox.jade-hamburg.de (mail.jade-hamburg.de [85.183.11.228])
\r
30 (using TLSv1 with cipher AES256-SHA (256/256 bits))
\r
31 (No client certificate requested) (Authenticated sender: teythoon)
\r
32 by mail.jade-hamburg.de (Postfix) with ESMTPSA id ADC7BDF2A2;
\r
33 Wed, 9 May 2012 12:23:10 +0200 (CEST)
\r
34 Received: from teythoon by thinkbox.jade-hamburg.de with local (Exim 4.77)
\r
35 (envelope-from <teythoon@thinkbox.jade-hamburg.de>)
\r
36 id 1SS43I-0001rq-6F; Wed, 09 May 2012 12:23:24 +0200
\r
37 From: Justus Winter <4winter@informatik.uni-hamburg.de>
\r
38 To: notmuch@notmuchmail.org
\r
39 Subject: [PATCH 1/3] go: update notmuch-addrlookup to the new API
\r
40 Date: Wed, 9 May 2012 12:23:06 +0200
\r
42 <1336558988-6813-2-git-send-email-4winter@informatik.uni-hamburg.de>
\r
43 X-Mailer: git-send-email 1.7.10
\r
45 <1336558988-6813-1-git-send-email-4winter@informatik.uni-hamburg.de>
\r
47 <1336558988-6813-1-git-send-email-4winter@informatik.uni-hamburg.de>
\r
48 X-BeenThere: notmuch@notmuchmail.org
\r
49 X-Mailman-Version: 2.1.13
\r
51 List-Id: "Use and development of the notmuch mail system."
\r
52 <notmuch.notmuchmail.org>
\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
56 List-Post: <mailto:notmuch@notmuchmail.org>
\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
60 X-List-Received-Date: Wed, 09 May 2012 10:23:37 -0000
\r
62 notmuch.OpenDatabase now returns a status indicating success or
\r
63 failure. Use this information to inform the user of any failures.
\r
65 Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
\r
67 bindings/go/cmds/notmuch-addrlookup.go | 8 ++++++--
\r
68 1 file changed, 6 insertions(+), 2 deletions(-)
\r
70 diff --git a/bindings/go/cmds/notmuch-addrlookup.go b/bindings/go/cmds/notmuch-addrlookup.go
\r
71 index 16958e5..03699fb 100644
\r
72 --- a/bindings/go/cmds/notmuch-addrlookup.go
\r
73 +++ b/bindings/go/cmds/notmuch-addrlookup.go
\r
74 @@ -209,8 +209,12 @@ func (self *address_matcher) run(name string) {
\r
75 queries := [3]*notmuch.Query{}
\r
77 // open the database
\r
78 - self.db = notmuch.OpenDatabase(self.user_db_path,
\r
79 - notmuch.DATABASE_MODE_READ_ONLY)
\r
80 + if db, status := notmuch.OpenDatabase(self.user_db_path,
\r
81 + notmuch.DATABASE_MODE_READ_ONLY); status == notmuch.STATUS_SUCCESS {
\r
84 + log.Fatalf("Failed to open the database: %v\n", status)
\r
87 // pass 1: look at all from: addresses with the address book tag
\r
88 query := "tag:" + self.user_addrbook_tag
\r