unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] python: deprecated add_message calls index_file correctly and returns result
@ 2017-08-28  7:39 Gaute Hope
  2017-08-29 22:00 ` Tomi Ollila
  2017-08-30  8:16 ` [PATCH v2] " Gaute Hope
  0 siblings, 2 replies; 10+ messages in thread
From: Gaute Hope @ 2017-08-28  7:39 UTC (permalink / raw)
  To: notmuch

The deprecated Database.add_message now calls the new index_file with
correct number of arguments (without an extra `self`), and returns the
tuple from index_file - as it used to do before.
---
 bindings/python/notmuch/database.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py
index a2c025eb..6199f58b 100644
--- a/bindings/python/notmuch/database.py
+++ b/bindings/python/notmuch/database.py
@@ -471,7 +471,7 @@ class Database(object):
     def add_message(self, filename, sync_maildir_flags=False):
         """Deprecated alias for :meth:`index_file`
         """
-        self.index_file(self, filename, sync_maildir_flags=sync_maildir_flags)
+        return self.index_file(filename, sync_maildir_flags=sync_maildir_flags)
 
     _remove_message = nmlib.notmuch_database_remove_message
     _remove_message.argtypes = [NotmuchDatabaseP, c_char_p]
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-09-13 15:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-28  7:39 [PATCH] python: deprecated add_message calls index_file correctly and returns result Gaute Hope
2017-08-29 22:00 ` Tomi Ollila
2017-08-30  6:55   ` Gaute Hope
2017-08-30  7:38     ` Tomi Ollila
2017-08-30  8:16 ` [PATCH v2] " Gaute Hope
2017-09-12 16:07   ` Daniel Kahn Gillmor
2017-09-12 18:28   ` David Bremner
2017-09-12 22:24     ` Dylan Baker
2017-09-12 23:29       ` David Bremner
2017-09-13 15:48         ` Dylan Baker

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).