1 Return-Path: <dkg@fifthhorseman.net>
\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 arlo.cworth.org (Postfix) with ESMTP id 4F3576DE1603
\r
6 for <notmuch@notmuchmail.org>; Wed, 9 Dec 2015 18:18:22 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=-0.039 tagged_above=-999 required=5
\r
12 tests=[AWL=-0.039] autolearn=disabled
\r
13 Received: from arlo.cworth.org ([127.0.0.1])
\r
14 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id fmqKl7Oe_AFY for <notmuch@notmuchmail.org>;
\r
16 Wed, 9 Dec 2015 18:18:20 -0800 (PST)
\r
17 Received: from che.mayfirst.org (che.mayfirst.org [209.234.253.108])
\r
18 by arlo.cworth.org (Postfix) with ESMTP id 08D066DE005F
\r
19 for <notmuch@notmuchmail.org>; Wed, 9 Dec 2015 18:18:19 -0800 (PST)
\r
20 Received: from fifthhorseman.net (unknown [38.109.115.130])
\r
21 by che.mayfirst.org (Postfix) with ESMTPSA id 482D5F984
\r
22 for <notmuch@notmuchmail.org>; Wed, 9 Dec 2015 21:18:17 -0500 (EST)
\r
23 Received: by fifthhorseman.net (Postfix, from userid 1000)
\r
24 id 6D7C22006D; Wed, 9 Dec 2015 21:18:17 -0500 (EST)
\r
25 From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
\r
26 To: Notmuch Mail <notmuch@notmuchmail.org>
\r
27 Subject: Re: [PATCH v2] add notmuch.Database.get_status_string()
\r
28 In-Reply-To: <1449713800-25608-1-git-send-email-dkg@fifthhorseman.net>
\r
29 References: <1449713573-25316-1-git-send-email-dkg@fifthhorseman.net>
\r
30 <1449713800-25608-1-git-send-email-dkg@fifthhorseman.net>
\r
31 User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1
\r
32 (x86_64-pc-linux-gnu)
\r
33 Date: Wed, 09 Dec 2015 21:18:17 -0500
\r
34 Message-ID: <87wpsnm4gm.fsf@alice.fifthhorseman.net>
\r
36 Content-Type: text/plain
\r
37 X-BeenThere: notmuch@notmuchmail.org
\r
38 X-Mailman-Version: 2.1.20
\r
40 List-Id: "Use and development of the notmuch mail system."
\r
41 <notmuch.notmuchmail.org>
\r
42 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
45 List-Post: <mailto:notmuch@notmuchmail.org>
\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
47 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
49 X-List-Received-Date: Thu, 10 Dec 2015 02:18:22 -0000
\r
51 Sorry about the first version, which didn't handle a NULL value
\r
52 properly. Please only consider this v2 version.
\r
56 On Wed 2015-12-09 21:16:40 -0500, Daniel Kahn Gillmor wrote:
\r
57 > This gives some additional access to debugging information when using
\r
58 > the python bindings.
\r
60 > bindings/python/notmuch/database.py | 16 ++++++++++++++++
\r
61 > 1 file changed, 16 insertions(+)
\r
63 > diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py
\r
64 > index 5b58e09..d29c292 100644
\r
65 > --- a/bindings/python/notmuch/database.py
\r
66 > +++ b/bindings/python/notmuch/database.py
\r
67 > @@ -114,6 +114,11 @@ class Database(object):
\r
68 > _get_all_tags.argtypes = [NotmuchDatabaseP]
\r
69 > _get_all_tags.restype = NotmuchTagsP
\r
71 > + """notmuch_database_status_string"""
\r
72 > + _get_status_string = nmlib.notmuch_database_status_string
\r
73 > + _get_status_string.argtypes = [NotmuchDatabaseP]
\r
74 > + _get_status_string.restype = c_char_p
\r
76 > """notmuch_database_create"""
\r
77 > _create = nmlib.notmuch_database_create
\r
78 > _create.argtypes = [c_char_p, POINTER(NotmuchDatabaseP)]
\r
79 > @@ -575,6 +580,17 @@ class Database(object):
\r
81 > return Query(self, querystring)
\r
83 > + def get_status_string(self):
\r
84 > + """Returns the status string of the database
\r
86 > + This is sometimes used for additional error reporting
\r
88 > + self._assert_db_is_initialized()
\r
89 > + s = Database._get_status_string(self._db)
\r
91 > + return s.decode('utf-8', 'ignore')
\r
94 > def __repr__(self):
\r
95 > return "'Notmuch DB " + self.get_path() + "'"
\r
100 > _______________________________________________
\r
101 > notmuch mailing list
\r
102 > notmuch@notmuchmail.org
\r
103 > https://notmuchmail.org/mailman/listinfo/notmuch
\r