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 23434431FD0
\r
6 for <notmuch@notmuchmail.org>; Sun, 25 Sep 2011 18:06:30 -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 P7qRO5PVvMLv for <notmuch@notmuchmail.org>;
\r
16 Sun, 25 Sep 2011 18:06:29 -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 8D7A5431FB6
\r
21 for <notmuch@notmuchmail.org>; Sun, 25 Sep 2011 18:06:29 -0700 (PDT)
\r
22 Received: from mail.jade-hamburg.de (unknown [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 6D21A505B23
\r
26 for <notmuch@notmuchmail.org>; Mon, 26 Sep 2011 03:06:28 +0200 (CEST)
\r
27 Received: by mail.jade-hamburg.de (Postfix, from userid 401)
\r
28 id E4220DF2A6; Mon, 26 Sep 2011 03:06:27 +0200 (CEST)
\r
29 Received: from thinkbox.jade-hamburg.de (unknown [10.1.1.109])
\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 B0C4DDF2A0;
\r
33 Mon, 26 Sep 2011 03:06:13 +0200 (CEST)
\r
34 Received: from teythoon by thinkbox.jade-hamburg.de with local (Exim 4.76)
\r
35 (envelope-from <teythoon@thinkbox.jade-hamburg.de>)
\r
36 id 1R7ze5-0007OL-7P; Mon, 26 Sep 2011 03:06:09 +0200
\r
37 From: Justus Winter <4winter@informatik.uni-hamburg.de>
\r
38 To: notmuch@notmuchmail.org
\r
39 Subject: [PATCH 4/9] python: fix NotmuchError.__str__ if status == None
\r
40 Date: Mon, 26 Sep 2011 03:05:32 +0200
\r
42 <1316999137-28257-4-git-send-email-4winter@informatik.uni-hamburg.de>
\r
43 X-Mailer: git-send-email 1.7.6.3
\r
45 <1316999137-28257-1-git-send-email-4winter@informatik.uni-hamburg.de>
\r
47 <1316999137-28257-1-git-send-email-4winter@informatik.uni-hamburg.de>
\r
48 X-Mailman-Approved-At: Mon, 26 Sep 2011 09:17:56 -0700
\r
49 Cc: Justus Winter <4winter@informatik.uni-hamburg.de>
\r
50 X-BeenThere: notmuch@notmuchmail.org
\r
51 X-Mailman-Version: 2.1.13
\r
53 List-Id: "Use and development of the notmuch mail system."
\r
54 <notmuch.notmuchmail.org>
\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
58 List-Post: <mailto:notmuch@notmuchmail.org>
\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
61 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
62 X-List-Received-Date: Mon, 26 Sep 2011 01:06:30 -0000
\r
64 Passing None to STATUS.status2str raises an ArgumentError. Add a
\r
65 check for this case and provide a generic message.
\r
67 Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
\r
69 bindings/python/notmuch/globals.py | 4 +++-
\r
70 1 files changed, 3 insertions(+), 1 deletions(-)
\r
72 diff --git a/bindings/python/notmuch/globals.py b/bindings/python/notmuch/globals.py
\r
73 index dd0c858..8b73f91 100644
\r
74 --- a/bindings/python/notmuch/globals.py
\r
75 +++ b/bindings/python/notmuch/globals.py
\r
76 @@ -97,8 +97,10 @@ class NotmuchError(Exception):
\r
78 if self.message is not None:
\r
81 + elif self.status is not None:
\r
82 return STATUS.status2str(self.status)
\r
84 + return 'Unknown error'
\r
87 """Ensure a nicely utf-8 encoded string to pass to libnotmuch
\r