[PATCH] configure: add --without-api-docs option
[notmuch-archives.git] / 0c / 532b7948d27d551a7a419c603762aac07ae08a
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 06C8E431FD0\r
6         for <notmuch@notmuchmail.org>; Sun, 25 Sep 2011 18:06:49 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\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 fwAwBobxMFwv for <notmuch@notmuchmail.org>;\r
16         Sun, 25 Sep 2011 18:06:47 -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 1BD60431FB6\r
21         for <notmuch@notmuchmail.org>; Sun, 25 Sep 2011 18:06:47 -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 E1699505B25\r
26         for <notmuch@notmuchmail.org>; Mon, 26 Sep 2011 03:06:45 +0200 (CEST)\r
27 Received: by mail.jade-hamburg.de (Postfix, from userid 401)\r
28         id 59847DF2A1; Mon, 26 Sep 2011 03:06:45 +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 5D6BDDF29F;\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-0007OI-2r; 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 3/9] python: reorder the arguments of NotmuchError.__init__()\r
40 Date: Mon, 26 Sep 2011 03:05:31 +0200\r
41 Message-Id:\r
42  <1316999137-28257-3-git-send-email-4winter@informatik.uni-hamburg.de>\r
43 X-Mailer: git-send-email 1.7.6.3\r
44 In-Reply-To:\r
45  <1316999137-28257-1-git-send-email-4winter@informatik.uni-hamburg.de>\r
46 References:\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
52 Precedence: list\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:49 -0000\r
63 \r
64 It is customary for subclasses of Exception to take a string as\r
65 the first argument that describes the problem.\r
66 \r
67 Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>\r
68 ---\r
69  bindings/python/notmuch/database.py |   48 ++++++++++++++--------------\r
70  bindings/python/notmuch/filename.py |    4 +-\r
71  bindings/python/notmuch/globals.py  |    6 ++--\r
72  bindings/python/notmuch/message.py  |   58 +++++++++++++++++-----------------\r
73  bindings/python/notmuch/tag.py      |    4 +-\r
74  bindings/python/notmuch/thread.py   |   32 +++++++++---------\r
75  6 files changed, 76 insertions(+), 76 deletions(-)\r
76 \r
77 diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py\r
78 index a462789..e174f55 100644\r
79 --- a/bindings/python/notmuch/database.py\r
80 +++ b/bindings/python/notmuch/database.py\r
81 @@ -108,7 +108,7 @@ class Database(object):\r
82      def _verify_initialized_db(self):\r
83          """Raises a NotmuchError in case self._db is still None"""\r
84          if self._db is None:\r
85 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
86 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
87  \r
88      def create(self, path):\r
89          """Creates a new notmuch database\r
90 @@ -247,9 +247,9 @@ class Database(object):\r
91              # we got an absolute path\r
92              if not path.startswith(self.get_path()):\r
93                  # but its initial components are not equal to the db path\r
94 -                raise NotmuchError(STATUS.FILE_ERROR,\r
95 -                                   message="Database().get_directory() called "\r
96 -                                           "with a wrong absolute path.")\r
97 +                raise NotmuchError(message="Database().get_directory() called "\r
98 +                                           "with a wrong absolute path.",\r
99 +                                   status=STATUS.FILE_ERROR)\r
100              abs_dirpath = path\r
101          else:\r
102              #we got a relative path, make it absolute\r
103 @@ -319,7 +319,7 @@ class Database(object):\r
104                                                    byref(msg_p))\r
105  \r
106          if not status in [STATUS.SUCCESS, STATUS.DUPLICATE_MESSAGE_ID]:\r
107 -            raise NotmuchError(status)\r
108 +            raise NotmuchError(status=status)\r
109  \r
110          #construct Message() and return\r
111          msg = Message(msg_p, self)\r
112 @@ -398,7 +398,7 @@ class Database(object):\r
113  \r
114          tags_p = Database._get_all_tags(self._db)\r
115          if tags_p == None:\r
116 -            raise NotmuchError(STATUS.NULL_POINTER)\r
117 +            raise NotmuchError(status=STATUS.NULL_POINTER)\r
118          return Tags(tags_p, self)\r
119  \r
120      def create_query(self, querystring):\r
121 @@ -524,13 +524,13 @@ class Query(object):\r
122                          (too little memory)\r
123          """\r
124          if db.db_p is None:\r
125 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
126 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
127          # create reference to parent db to keep it alive\r
128          self._db = db\r
129          # create query, return None if too little mem available\r
130          query_p = Query._create(db.db_p, _str(querystr))\r
131          if query_p is None:\r
132 -            raise NotmuchError(STATUS.NULL_POINTER)\r
133 +            raise NotmuchError(status=STATUS.NULL_POINTER)\r
134          self._query = query_p\r
135  \r
136      def set_sort(self, sort):\r
137 @@ -544,7 +544,7 @@ class Query(object):\r
138                      been initialized.\r
139          """\r
140          if self._query is None:\r
141 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
142 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
143  \r
144          self.sort = sort\r
145          nmlib.notmuch_query_set_sort(self._query, sort)\r
146 @@ -570,12 +570,12 @@ class Query(object):\r
147                        * STATUS.NULL_POINTER if search_threads failed\r
148          """\r
149          if self._query is None:\r
150 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
151 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
152  \r
153          threads_p = Query._search_threads(self._query)\r
154  \r
155          if threads_p is None:\r
156 -            raise NotmuchError(STATUS.NULL_POINTER)\r
157 +            raise NotmuchError(status=STATUS.NULL_POINTER)\r
158  \r
159          return Threads(threads_p, self)\r
160  \r
161 @@ -593,12 +593,12 @@ class Query(object):\r
162                        * STATUS.NULL_POINTER if search_messages failed\r
163          """\r
164          if self._query is None:\r
165 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
166 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
167  \r
168          msgs_p = Query._search_messages(self._query)\r
169  \r
170          if msgs_p is None:\r
171 -            raise NotmuchError(STATUS.NULL_POINTER)\r
172 +            raise NotmuchError(status=STATUS.NULL_POINTER)\r
173  \r
174          return Messages(msgs_p, self)\r
175  \r
176 @@ -618,7 +618,7 @@ class Query(object):\r
177                        * STATUS.NOT_INITIALIZED if query is not inited\r
178          """\r
179          if self._query is None:\r
180 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
181 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
182  \r
183          return Query._count_messages(self._query)\r
184  \r
185 @@ -659,9 +659,9 @@ class Directory(object):\r
186      _get_child_directories.restype = c_void_p\r
187  \r
188      def _verify_dir_initialized(self):\r
189 -        """Raises a NotmuchError(STATUS.NOT_INITIALIZED) if dir_p is None"""\r
190 +        """Raises a NotmuchError(status=STATUS.NOT_INITIALIZED) if dir_p is None"""\r
191          if self._dir_p is None:\r
192 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
193 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
194  \r
195      def __init__(self, path, dir_p, parent):\r
196          """\r
197 @@ -713,7 +713,7 @@ class Directory(object):\r
198                          STATUS.NOT_INITIALIZED\r
199                            The directory has not been initialized\r
200          """\r
201 -        #Raise a NotmuchError(STATUS.NOT_INITIALIZED) if the dir_p is None\r
202 +        #Raise a NotmuchError(status=STATUS.NOT_INITIALIZED) if the dir_p is None\r
203          self._verify_dir_initialized()\r
204  \r
205          #TODO: make sure, we convert the mtime parameter to a 'c_long'\r
206 @@ -723,7 +723,7 @@ class Directory(object):\r
207          if status == STATUS.SUCCESS:\r
208              return\r
209          #fail with Exception otherwise\r
210 -        raise NotmuchError(status)\r
211 +        raise NotmuchError(status=status)\r
212  \r
213      def get_mtime(self):\r
214          """Gets the mtime value of this directory in the database\r
215 @@ -737,7 +737,7 @@ class Directory(object):\r
216                          STATUS.NOT_INITIALIZED\r
217                            The directory has not been initialized\r
218          """\r
219 -        #Raise a NotmuchError(STATUS.NOT_INITIALIZED) if self.dir_p is None\r
220 +        #Raise a NotmuchError(status=STATUS.NOT_INITIALIZED) if self.dir_p is None\r
221          self._verify_dir_initialized()\r
222  \r
223          return Directory._get_mtime(self._dir_p)\r
224 @@ -756,7 +756,7 @@ class Directory(object):\r
225          The returned filenames will be the basename-entries only (not\r
226          complete paths.\r
227          """\r
228 -        #Raise a NotmuchError(STATUS.NOT_INITIALIZED) if self._dir_p is None\r
229 +        #Raise a NotmuchError(status=STATUS.NOT_INITIALIZED) if self._dir_p is None\r
230          self._verify_dir_initialized()\r
231  \r
232          files_p = Directory._get_child_files(self._dir_p)\r
233 @@ -769,7 +769,7 @@ class Directory(object):\r
234          The returned filenames will be the basename-entries only (not\r
235          complete paths.\r
236          """\r
237 -        #Raise a NotmuchError(STATUS.NOT_INITIALIZED) if self._dir_p is None\r
238 +        #Raise a NotmuchError(status=STATUS.NOT_INITIALIZED) if self._dir_p is None\r
239          self._verify_dir_initialized()\r
240  \r
241          files_p = Directory._get_child_directories(self._dir_p)\r
242 @@ -815,7 +815,7 @@ class Filenames(object):\r
243  \r
244      def next(self):\r
245          if self._files_p is None:\r
246 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
247 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
248  \r
249          if not nmlib.notmuch_filenames_valid(self._files_p):\r
250              self._files_p = None\r
251 @@ -834,11 +834,11 @@ class Filenames(object):\r
252                   #THIS FAILS\r
253                   files = Database().get_directory('').get_child_files()\r
254                   if len(files) > 0:              #this 'exhausts' msgs\r
255 -                     # next line raises NotmuchError(STATUS.NOT_INITIALIZED)!!!\r
256 +                     # next line raises NotmuchError(status=STATUS.NOT_INITIALIZED)!!!\r
257                       for file in files: print file\r
258          """\r
259          if self._files_p is None:\r
260 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
261 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
262  \r
263          i = 0\r
264          while nmlib.notmuch_filenames_valid(self._files_p):\r
265 diff --git a/bindings/python/notmuch/filename.py b/bindings/python/notmuch/filename.py\r
266 index a16e717..c5dfd94 100644\r
267 --- a/bindings/python/notmuch/filename.py\r
268 +++ b/bindings/python/notmuch/filename.py\r
269 @@ -68,7 +68,7 @@ class Filenames(object):\r
270               once all derived objects are dead.\r
271          """\r
272          if files_p is None:\r
273 -            raise NotmuchError(STATUS.NULL_POINTER)\r
274 +            raise NotmuchError(status=STATUS.NULL_POINTER)\r
275  \r
276          self._files = files_p\r
277          #save reference to parent object so we keep it alive\r
278 @@ -80,7 +80,7 @@ class Filenames(object):\r
279          This is the main function that will usually be used by the\r
280          user."""\r
281          if self._files is None:\r
282 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
283 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
284  \r
285          if not nmlib.notmuch_filenames_valid(self._files):\r
286              self._files = None\r
287 diff --git a/bindings/python/notmuch/globals.py b/bindings/python/notmuch/globals.py\r
288 index 779ba5f..dd0c858 100644\r
289 --- a/bindings/python/notmuch/globals.py\r
290 +++ b/bindings/python/notmuch/globals.py\r
291 @@ -89,10 +89,10 @@ STATUS.__name__ = 'STATUS'\r
292  \r
293  \r
294  class NotmuchError(Exception):\r
295 -    def __init__(self, status=None, message=None):\r
296 -        """Is initiated with a (notmuch.STATUS[,message=None])"""\r
297 -        self.status = status\r
298 +    def __init__(self, message=None, status=None):\r
299 +        """Is initiated with a (message=None[,status=notmuch.STATUS])"""\r
300          self.message = message\r
301 +        self.status = status\r
302  \r
303      def __str__(self):\r
304          if self.message is not None:\r
305 diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py\r
306 index a48900c..5cc3175 100644\r
307 --- a/bindings/python/notmuch/message.py\r
308 +++ b/bindings/python/notmuch/message.py\r
309 @@ -115,7 +115,7 @@ class Messages(object):\r
310                 the Python object.(?)\r
311          """\r
312          if msgs_p is None:\r
313 -            raise NotmuchError(STATUS.NULL_POINTER)\r
314 +            raise NotmuchError(status=STATUS.NULL_POINTER)\r
315  \r
316          self._msgs = msgs_p\r
317          #store parent, so we keep them alive as long as self  is alive\r
318 @@ -131,7 +131,7 @@ class Messages(object):\r
319            therefore will not allow further iterations.\r
320          """\r
321          if self._msgs is None:\r
322 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
323 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
324  \r
325          # collect all tags (returns NULL on error)\r
326          tags_p = Messages._collect_tags(self._msgs)\r
327 @@ -139,7 +139,7 @@ class Messages(object):\r
328          self._msgs = None\r
329  \r
330          if tags_p == None:\r
331 -            raise NotmuchError(STATUS.NULL_POINTER)\r
332 +            raise NotmuchError(status=STATUS.NULL_POINTER)\r
333          return Tags(tags_p, self)\r
334  \r
335      def __iter__(self):\r
336 @@ -148,7 +148,7 @@ class Messages(object):\r
337  \r
338      def next(self):\r
339          if self._msgs is None:\r
340 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
341 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
342  \r
343          if not nmlib.notmuch_messages_valid(self._msgs):\r
344              self._msgs = None\r
345 @@ -292,7 +292,7 @@ class Message(object):\r
346                objects are dead.\r
347          """\r
348          if msg_p is None:\r
349 -            raise NotmuchError(STATUS.NULL_POINTER)\r
350 +            raise NotmuchError(status=STATUS.NULL_POINTER)\r
351          self._msg = msg_p\r
352          #keep reference to parent, so we keep it alive\r
353          self._parent = parent\r
354 @@ -305,7 +305,7 @@ class Message(object):\r
355                      is not initialized.\r
356          """\r
357          if self._msg is None:\r
358 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
359 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
360          return Message._get_message_id(self._msg)\r
361  \r
362      def get_thread_id(self):\r
363 @@ -322,7 +322,7 @@ class Message(object):\r
364                      is not initialized.\r
365          """\r
366          if self._msg is None:\r
367 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
368 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
369  \r
370          return Message._get_thread_id(self._msg)\r
371  \r
372 @@ -345,7 +345,7 @@ class Message(object):\r
373                      is not initialized.\r
374          """\r
375          if self._msg is None:\r
376 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
377 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
378  \r
379          msgs_p = Message._get_replies(self._msg)\r
380  \r
381 @@ -367,7 +367,7 @@ class Message(object):\r
382                      is not initialized.\r
383          """\r
384          if self._msg is None:\r
385 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
386 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
387          return Message._get_date(self._msg)\r
388  \r
389      def get_header(self, header):\r
390 @@ -389,12 +389,12 @@ class Message(object):\r
391                      * STATUS.NULL_POINTER, if no header was found\r
392          """\r
393          if self._msg is None:\r
394 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
395 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
396  \r
397          #Returns NULL if any error occurs.\r
398          header = Message._get_header(self._msg, header)\r
399          if header == None:\r
400 -            raise NotmuchError(STATUS.NULL_POINTER)\r
401 +            raise NotmuchError(status=STATUS.NULL_POINTER)\r
402          return header.decode('UTF-8')\r
403  \r
404      def get_filename(self):\r
405 @@ -405,7 +405,7 @@ class Message(object):\r
406                is not initialized.\r
407          """\r
408          if self._msg is None:\r
409 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
410 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
411          return Message._get_filename(self._msg)\r
412  \r
413      def get_filenames(self):\r
414 @@ -415,7 +415,7 @@ class Message(object):\r
415          messages recorded to have the same Message-ID. These files must\r
416          not necessarily have identical content."""\r
417          if self._msg is None:\r
418 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
419 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
420  \r
421          files_p = Message._get_filenames(self._msg)\r
422  \r
423 @@ -435,7 +435,7 @@ class Message(object):\r
424                is not initialized.\r
425          """\r
426          if self._msg is None:\r
427 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
428 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
429          return Message._get_flag(self._msg, flag)\r
430  \r
431      def set_flag(self, flag, value):\r
432 @@ -450,7 +450,7 @@ class Message(object):\r
433                is not initialized.\r
434          """\r
435          if self._msg is None:\r
436 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
437 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
438          nmlib.notmuch_message_set_flag(self._msg, flag, value)\r
439  \r
440      def get_tags(self):\r
441 @@ -464,11 +464,11 @@ class Message(object):\r
442                        * STATUS.NULL_POINTER, on error\r
443          """\r
444          if self._msg is None:\r
445 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
446 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
447  \r
448          tags_p = Message._get_tags(self._msg)\r
449          if tags_p == None:\r
450 -            raise NotmuchError(STATUS.NULL_POINTER)\r
451 +            raise NotmuchError(status=STATUS.NULL_POINTER)\r
452          return Tags(tags_p, self)\r
453  \r
454      def add_tag(self, tag, sync_maildir_flags=False):\r
455 @@ -503,13 +503,13 @@ class Message(object):\r
456                       The message has not been initialized.\r
457         """\r
458          if self._msg is None:\r
459 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
460 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
461  \r
462          status = nmlib.notmuch_message_add_tag(self._msg, _str(tag))\r
463  \r
464          # bail out on failure\r
465          if status != STATUS.SUCCESS:\r
466 -            raise NotmuchError(status)\r
467 +            raise NotmuchError(status=status)\r
468  \r
469          if sync_maildir_flags:\r
470              self.tags_to_maildir_flags()\r
471 @@ -547,12 +547,12 @@ class Message(object):\r
472                       The message has not been initialized.\r
473          """\r
474          if self._msg is None:\r
475 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
476 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
477  \r
478          status = nmlib.notmuch_message_remove_tag(self._msg, _str(tag))\r
479          # bail out on error\r
480          if status != STATUS.SUCCESS:\r
481 -            raise NotmuchError(status)\r
482 +            raise NotmuchError(status=status)\r
483  \r
484          if sync_maildir_flags:\r
485              self.tags_to_maildir_flags()\r
486 @@ -584,13 +584,13 @@ class Message(object):\r
487                       The message has not been initialized.\r
488          """\r
489          if self._msg is None:\r
490 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
491 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
492  \r
493          status = nmlib.notmuch_message_remove_all_tags(self._msg)\r
494  \r
495          # bail out on error\r
496          if status != STATUS.SUCCESS:\r
497 -            raise NotmuchError(status)\r
498 +            raise NotmuchError(status=status)\r
499  \r
500          if sync_maildir_flags:\r
501              self.tags_to_maildir_flags()\r
502 @@ -638,7 +638,7 @@ class Message(object):\r
503                       The message has not been initialized.\r
504          """\r
505          if self._msg is None:\r
506 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
507 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
508  \r
509          status = nmlib.notmuch_message_freeze(self._msg)\r
510  \r
511 @@ -646,7 +646,7 @@ class Message(object):\r
512              # return on success\r
513              return status\r
514  \r
515 -        raise NotmuchError(status)\r
516 +        raise NotmuchError(status=status)\r
517  \r
518      def thaw(self):\r
519          """Thaws the current 'message'\r
520 @@ -673,7 +673,7 @@ class Message(object):\r
521                       The message has not been initialized.\r
522          """\r
523          if self._msg is None:\r
524 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
525 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
526  \r
527          status = nmlib.notmuch_message_thaw(self._msg)\r
528  \r
529 @@ -681,7 +681,7 @@ class Message(object):\r
530              # return on success\r
531              return status\r
532  \r
533 -        raise NotmuchError(status)\r
534 +        raise NotmuchError(status=status)\r
535  \r
536      def is_match(self):\r
537          """(Not implemented)"""\r
538 @@ -709,7 +709,7 @@ class Message(object):\r
539          :returns: a :class:`STATUS`. In short, you want to see\r
540              notmuch.STATUS.SUCCESS here. See there for details."""\r
541          if self._msg is None:\r
542 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
543 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
544          status = Message._tags_to_maildir_flags(self._msg)\r
545  \r
546      def maildir_flags_to_tags(self):\r
547 @@ -736,7 +736,7 @@ class Message(object):\r
548          :returns: a :class:`STATUS`. In short, you want to see\r
549              notmuch.STATUS.SUCCESS here. See there for details."""\r
550          if self._msg is None:\r
551 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
552 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
553          status = Message._tags_to_maildir_flags(self._msg)\r
554  \r
555      def __repr__(self):\r
556 diff --git a/bindings/python/notmuch/tag.py b/bindings/python/notmuch/tag.py\r
557 index 50e3686..9ca871a 100644\r
558 --- a/bindings/python/notmuch/tag.py\r
559 +++ b/bindings/python/notmuch/tag.py\r
560 @@ -70,7 +70,7 @@ class Tags(object):\r
561                 cache the tags in the Python object(?)\r
562          """\r
563          if tags_p is None:\r
564 -            raise NotmuchError(STATUS.NULL_POINTER)\r
565 +            raise NotmuchError(status=STATUS.NULL_POINTER)\r
566  \r
567          self._tags = tags_p\r
568          #save reference to parent object so we keep it alive\r
569 @@ -82,7 +82,7 @@ class Tags(object):\r
570  \r
571      def next(self):\r
572          if self._tags is None:\r
573 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
574 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
575          if not nmlib.notmuch_tags_valid(self._tags):\r
576              self._tags = None\r
577              raise StopIteration\r
578 diff --git a/bindings/python/notmuch/thread.py b/bindings/python/notmuch/thread.py\r
579 index 5e08eb3..93089d0 100644\r
580 --- a/bindings/python/notmuch/thread.py\r
581 +++ b/bindings/python/notmuch/thread.py\r
582 @@ -95,7 +95,7 @@ class Threads(object):\r
583                 the Python object.(?)\r
584          """\r
585          if threads_p is None:\r
586 -            raise NotmuchError(STATUS.NULL_POINTER)\r
587 +            raise NotmuchError(status=STATUS.NULL_POINTER)\r
588  \r
589          self._threads = threads_p\r
590          #store parent, so we keep them alive as long as self  is alive\r
591 @@ -107,7 +107,7 @@ class Threads(object):\r
592  \r
593      def next(self):\r
594          if self._threads is None:\r
595 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
596 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
597  \r
598          if not nmlib.notmuch_threads_valid(self._threads):\r
599              self._threads = None\r
600 @@ -126,11 +126,11 @@ class Threads(object):\r
601                   #THIS FAILS\r
602                   threads = Database().create_query('').search_threads()\r
603                   if len(threads) > 0:              #this 'exhausts' threads\r
604 -                     # next line raises NotmuchError(STATUS.NOT_INITIALIZED)!!!\r
605 +                     # next line raises NotmuchError(status=STATUS.NOT_INITIALIZED)!!!\r
606                       for thread in threads: print thread\r
607          """\r
608          if self._threads is None:\r
609 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
610 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
611  \r
612          i = 0\r
613          # returns 'bool'. On out-of-memory it returns None\r
614 @@ -206,7 +206,7 @@ class Thread(object):\r
615                objects are dead.\r
616          """\r
617          if thread_p is None:\r
618 -            raise NotmuchError(STATUS.NULL_POINTER)\r
619 +            raise NotmuchError(status=STATUS.NULL_POINTER)\r
620          self._thread = thread_p\r
621          #keep reference to parent, so we keep it alive\r
622          self._parent = parent\r
623 @@ -222,7 +222,7 @@ class Thread(object):\r
624                      is not initialized.\r
625          """\r
626          if self._thread is None:\r
627 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
628 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
629          return Thread._get_thread_id(self._thread)\r
630  \r
631      def get_total_messages(self):\r
632 @@ -235,7 +235,7 @@ class Thread(object):\r
633                      is not initialized.\r
634          """\r
635          if self._thread is None:\r
636 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
637 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
638          return nmlib.notmuch_thread_get_total_messages(self._thread)\r
639  \r
640      def get_toplevel_messages(self):\r
641 @@ -258,12 +258,12 @@ class Thread(object):\r
642                        * STATUS.NULL_POINTER if search_messages failed\r
643          """\r
644          if self._thread is None:\r
645 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
646 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
647  \r
648          msgs_p = Thread._get_toplevel_messages(self._thread)\r
649  \r
650          if msgs_p is None:\r
651 -            raise NotmuchError(STATUS.NULL_POINTER)\r
652 +            raise NotmuchError(status=STATUS.NULL_POINTER)\r
653  \r
654          return Messages(msgs_p, self)\r
655  \r
656 @@ -277,7 +277,7 @@ class Thread(object):\r
657                      is not initialized.\r
658          """\r
659          if self._thread is None:\r
660 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
661 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
662          return nmlib.notmuch_thread_get_matched_messages(self._thread)\r
663  \r
664      def get_authors(self):\r
665 @@ -291,7 +291,7 @@ class Thread(object):\r
666          as long as this Thread() is not deleted.\r
667          """\r
668          if self._thread is None:\r
669 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
670 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
671          authors = Thread._get_authors(self._thread)\r
672          if authors is None:\r
673              return None\r
674 @@ -304,7 +304,7 @@ class Thread(object):\r
675          as long as this Thread() is not deleted.\r
676          """\r
677          if self._thread is None:\r
678 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
679 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
680          subject = Thread._get_subject(self._thread)\r
681          if subject is None:\r
682              return None\r
683 @@ -319,7 +319,7 @@ class Thread(object):\r
684                      is not initialized.\r
685          """\r
686          if self._thread is None:\r
687 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
688 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
689          return Thread._get_newest_date(self._thread)\r
690  \r
691      def get_oldest_date(self):\r
692 @@ -331,7 +331,7 @@ class Thread(object):\r
693                      is not initialized.\r
694          """\r
695          if self._thread is None:\r
696 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
697 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
698          return Thread._get_oldest_date(self._thread)\r
699  \r
700      def get_tags(self):\r
701 @@ -354,11 +354,11 @@ class Thread(object):\r
702                        * STATUS.NULL_POINTER, on error\r
703          """\r
704          if self._thread is None:\r
705 -            raise NotmuchError(STATUS.NOT_INITIALIZED)\r
706 +            raise NotmuchError(status=STATUS.NOT_INITIALIZED)\r
707  \r
708          tags_p = Thread._get_tags(self._thread)\r
709          if tags_p == None:\r
710 -            raise NotmuchError(STATUS.NULL_POINTER)\r
711 +            raise NotmuchError(status=STATUS.NULL_POINTER)\r
712          return Tags(tags_p, self)\r
713  \r
714      def __str__(self):\r
715 -- \r
716 1.7.6.3\r
717 \r