1 Return-Path: <patricktotzke@googlemail.com>
\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 2E749429E26
\r
6 for <notmuch@notmuchmail.org>; Fri, 22 Jul 2011 12:13:26 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0.514 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, URI_HEX=1.313]
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id El13+PD7WJfz for <notmuch@notmuchmail.org>;
\r
18 Fri, 22 Jul 2011 12:13:25 -0700 (PDT)
\r
19 Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com
\r
20 [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
21 (No client certificate requested)
\r
22 by olra.theworths.org (Postfix) with ESMTPS id 77ACB431FD0
\r
23 for <notmuch@notmuchmail.org>; Fri, 22 Jul 2011 12:13:25 -0700 (PDT)
\r
24 Received: by wyh22 with SMTP id 22so1948891wyh.26
\r
25 for <notmuch@notmuchmail.org>; Fri, 22 Jul 2011 12:13:24 -0700 (PDT)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
27 d=googlemail.com; s=gamma;
\r
28 h=date:from:to:cc:subject:message-id:references:mime-version
\r
29 :content-type:content-disposition:in-reply-to:user-agent;
\r
30 bh=d7dPS8VZgF/m4i/QF3aoQPNmtVGUeUEKl4HcZx4fmCo=;
\r
31 b=CcNrS0L/9A+tLyC6i+1+IVFC/SOfYfWfMyE8l63eAnokg3/ix7RNeWbAOTXYUTynbO
\r
32 DjOKZ3YLt0qBXAjqM/EAYl3B5kP+XEhfUZ3f9vyTv1hqA0KAZNIddvlu04yOub7BPqYi
\r
33 dfm3fj9yvoVtUYSKSqngNEmxJEQt9D9Ud4e8c=
\r
34 Received: by 10.216.60.144 with SMTP id u16mr2177039wec.5.1311362003243;
\r
35 Fri, 22 Jul 2011 12:13:23 -0700 (PDT)
\r
36 Received: from brick.lan (cpc1-sgyl2-0-0-cust47.sgyl.cable.virginmedia.com
\r
38 by mx.google.com with ESMTPS id o19sm2142134wbh.26.2011.07.22.12.13.19
\r
39 (version=TLSv1/SSLv3 cipher=OTHER);
\r
40 Fri, 22 Jul 2011 12:13:20 -0700 (PDT)
\r
41 Date: Fri, 22 Jul 2011 20:13:16 +0100
\r
42 From: Patrick Totzke <patricktotzke@googlemail.com>
\r
43 To: Michael Heinrich <michael@haas-heinrich.de>
\r
44 Subject: Re: [Patch] tag.py: Bugfix to avoid decode() on a NoneType object
\r
45 Message-ID: <20110722191316.GA12929@brick.lan>
\r
46 References: <loom.20110722T160702-94@post.gmane.org>
\r
48 Content-Type: multipart/signed; micalg=pgp-sha1;
\r
49 protocol="application/pgp-signature"; boundary="sm4nu43k4a2Rpi4c"
\r
50 Content-Disposition: inline
\r
51 In-Reply-To: <loom.20110722T160702-94@post.gmane.org>
\r
52 User-Agent: Mutt/1.5.21 (2010-09-15)
\r
53 Cc: notmuch@notmuchmail.org
\r
54 X-BeenThere: notmuch@notmuchmail.org
\r
55 X-Mailman-Version: 2.1.13
\r
57 List-Id: "Use and development of the notmuch mail system."
\r
58 <notmuch.notmuchmail.org>
\r
59 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
61 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
62 List-Post: <mailto:notmuch@notmuchmail.org>
\r
63 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
64 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
65 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
66 X-List-Received-Date: Fri, 22 Jul 2011 19:13:26 -0000
\r
70 Content-Type: text/plain; charset=us-ascii
\r
71 Content-Disposition: inline
\r
72 Content-Transfer-Encoding: quoted-printable
\r
76 I also fell over this a while ago. (cf. http://notmuch.198994.n3.nabble.com=
\r
77 /Encodings-td3159281.html)
\r
78 Your patch certainly fix the immediate error, but there is ore to the probl=
\r
80 Tagstrings seem to be the only ones stored by notmuch as-is, so unlike
\r
81 headers, they don't get converted to utf-8. The patch that lead to
\r
82 this .decode('utf-8') was pushed a bit too hastily.
\r
83 As Uwe mentiones in above cited thread, we could consider enforcing
\r
90 On Fri, Jul 22, 2011 at 02:11:41PM +0000, Michael Heinrich wrote:
\r
93 > with current head I get following error in my python scripts when I read =
\r
95 > tags of a message:
\r
97 > File "/home/heinrich/.local/lib/python2.6/site-packages/notmuch/tag.py"=
\r
100 > tag =3D Tags._get(self._tags).decode('utf-8')
\r
105 > diff --git a/bindings/python/notmuch/tag.py b/bindings/python/notmuch/tag=
\r
107 > index 65a9118..e9049fc 100644
\r
108 > --- a/bindings/python/notmuch/tag.py
\r
109 > +++ b/bindings/python/notmuch/tag.py
\r
110 > @@ -85,10 +85,12 @@ class Tags(object):
\r
111 > raise NotmuchError(STATUS.NOT_INITIALIZED)
\r
112 > # No need to call nmlib.notmuch_tags_valid(self._tags);
\r
113 > # Tags._get safely returns None, if there is no more valid tag.
\r
114 > - tag =3D Tags._get(self._tags).decode('utf-8')
\r
115 > + tag =3D Tags._get(self._tags)
\r
117 > self._tags =3D None
\r
118 > raise StopIteration
\r
120 > + tag =3D tag.decode('utf-8')
\r
121 > nmlib.notmuch_tags_move_to_next(self._tags)
\r
127 > _______________________________________________
\r
128 > notmuch mailing list
\r
129 > notmuch@notmuchmail.org
\r
130 > http://notmuchmail.org/mailman/listinfo/notmuch
\r
133 Content-Type: application/pgp-signature; name="signature.asc"
\r
134 Content-Description: Digital signature
\r
136 -----BEGIN PGP SIGNATURE-----
\r
137 Version: GnuPG v1.4.11 (GNU/Linux)
\r
139 iEYEARECAAYFAk4py8wACgkQlDQDZ9fWxapwGwCfbczyKodcgJWrPsN6u6Chd4Y0
\r
140 Q10AnR3VtSP3M2d9Gj75/0v00R2PgX/s
\r
142 -----END PGP SIGNATURE-----
\r
144 --sm4nu43k4a2Rpi4c--
\r