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 4FAD7429E47
\r
6 for <notmuch@notmuchmail.org>; Wed, 14 Dec 2011 02:59:30 -0800 (PST)
\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 jvh75MxL6G7m for <notmuch@notmuchmail.org>;
\r
16 Wed, 14 Dec 2011 02:59:28 -0800 (PST)
\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 6B438429E4C
\r
21 for <notmuch@notmuchmail.org>; Wed, 14 Dec 2011 02:59:06 -0800 (PST)
\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 1165550F614
\r
26 for <notmuch@notmuchmail.org>; Wed, 14 Dec 2011 11:59:05 +0100 (CET)
\r
27 Received: by mail.jade-hamburg.de (Postfix, from userid 401)
\r
28 id 8A389DF2A0; Wed, 14 Dec 2011 11:59:04 +0100 (CET)
\r
29 Received: from thinkbox.jade-hamburg.de (unknown [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 446BFDF2A6;
\r
33 Wed, 14 Dec 2011 11:58:48 +0100 (CET)
\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 1RamXs-0004Mk-7d; Wed, 14 Dec 2011 11:58:44 +0100
\r
37 From: Justus Winter <4winter@informatik.uni-hamburg.de>
\r
38 To: notmuch@notmuchmail.org
\r
39 Subject: [PATCH 7/7] python: add missing conversions from and to utf-8
\r
40 Date: Wed, 14 Dec 2011 11:58:25 +0100
\r
42 <1323860305-15802-8-git-send-email-4winter@informatik.uni-hamburg.de>
\r
43 X-Mailer: git-send-email 1.7.7.3
\r
45 <1323860305-15802-1-git-send-email-4winter@informatik.uni-hamburg.de>
\r
47 <1323860305-15802-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, 14 Dec 2011 10:59:31 -0000
\r
63 bindings/python/notmuch/database.py | 6 +++---
\r
64 bindings/python/notmuch/filename.py | 2 +-
\r
65 bindings/python/notmuch/message.py | 8 ++++----
\r
66 bindings/python/notmuch/thread.py | 2 +-
\r
67 4 files changed, 9 insertions(+), 9 deletions(-)
\r
69 diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py
\r
70 index 3f6e04d..2eae69e 100644
\r
71 --- a/bindings/python/notmuch/database.py
\r
72 +++ b/bindings/python/notmuch/database.py
\r
73 @@ -430,7 +430,7 @@ class Database(object):
\r
76 self._assert_db_is_initialized()
\r
77 - return self._remove_message(self._db, filename)
\r
78 + return self._remove_message(self._db, _str(filename))
\r
80 def find_message(self, msgid):
\r
81 """Returns a :class:`Message` as identified by its message ID
\r
82 @@ -933,9 +933,9 @@ class Filenames(object):
\r
83 self._files_p = None
\r
86 - file = Filenames._get(self._files_p)
\r
87 + file_ = Filenames._get(self._files_p)
\r
88 self._move_to_next(self._files_p)
\r
90 + return file_.decode('utf-8', errors='ignore')
\r
91 next = __next__ # python2.x iterator protocol compatibility
\r
94 diff --git a/bindings/python/notmuch/filename.py b/bindings/python/notmuch/filename.py
\r
95 index 969931a..0c2e0d5 100644
\r
96 --- a/bindings/python/notmuch/filename.py
\r
97 +++ b/bindings/python/notmuch/filename.py
\r
98 @@ -93,7 +93,7 @@ class Filenames(Python3StringMixIn):
\r
99 raise NotmuchError(STATUS.NOT_INITIALIZED)
\r
101 while self._valid(self._files):
\r
102 - yield Filenames._get(self._files)
\r
103 + yield Filenames._get(self._files).decode('utf-8', errors='ignore')
\r
104 self._move_to_next(self._files)
\r
107 diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py
\r
108 index 955382d..245e814 100644
\r
109 --- a/bindings/python/notmuch/message.py
\r
110 +++ b/bindings/python/notmuch/message.py
\r
111 @@ -338,7 +338,7 @@ class Message(Python3StringMixIn):
\r
113 if self._msg is None:
\r
114 raise NotmuchError(STATUS.NOT_INITIALIZED)
\r
115 - return Message._get_message_id(self._msg)
\r
116 + return Message._get_message_id(self._msg).decode('utf-8', errors='ignore')
\r
118 def get_thread_id(self):
\r
119 """Returns the thread ID
\r
120 @@ -356,7 +356,7 @@ class Message(Python3StringMixIn):
\r
121 if self._msg is None:
\r
122 raise NotmuchError(STATUS.NOT_INITIALIZED)
\r
124 - return Message._get_thread_id(self._msg)
\r
125 + return Message._get_thread_id(self._msg).decode('utf-8', errors='ignore')
\r
127 def get_replies(self):
\r
128 """Gets all direct replies to this message as :class:`Messages`
\r
129 @@ -426,7 +426,7 @@ class Message(Python3StringMixIn):
\r
130 raise NotmuchError(STATUS.NOT_INITIALIZED)
\r
132 #Returns NULL if any error occurs.
\r
133 - header = Message._get_header(self._msg, header)
\r
134 + header = Message._get_header(self._msg, _str(header))
\r
136 raise NotmuchError(STATUS.NULL_POINTER)
\r
137 return header.decode('UTF-8', errors='ignore')
\r
138 @@ -440,7 +440,7 @@ class Message(Python3StringMixIn):
\r
140 if self._msg is None:
\r
141 raise NotmuchError(STATUS.NOT_INITIALIZED)
\r
142 - return Message._get_filename(self._msg)
\r
143 + return Message._get_filename(self._msg).decode('utf-8', errors='ignore')
\r
145 def get_filenames(self):
\r
146 """Get all filenames for the email corresponding to 'message'
\r
147 diff --git a/bindings/python/notmuch/thread.py b/bindings/python/notmuch/thread.py
\r
148 index 3912957..2ed7db0 100644
\r
149 --- a/bindings/python/notmuch/thread.py
\r
150 +++ b/bindings/python/notmuch/thread.py
\r
151 @@ -246,7 +246,7 @@ class Thread(object):
\r
153 if self._thread is None:
\r
154 raise NotmuchError(STATUS.NOT_INITIALIZED)
\r
155 - return Thread._get_thread_id(self._thread)
\r
156 + return Thread._get_thread_id(self._thread).decode('utf-8', errors='ignore')
\r
158 _get_total_messages = nmlib.notmuch_thread_get_total_messages
\r
159 _get_total_messages.argtypes = [NotmuchThreadP]
\r