From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 2239C6DE00C4 for ; Mon, 28 Aug 2017 00:39:33 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.105 X-Spam-Level: X-Spam-Status: No, score=-0.105 tagged_above=-999 required=5 tests=[AWL=-0.085, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vrs8njYtgCMp for ; Mon, 28 Aug 2017 00:39:29 -0700 (PDT) Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com [209.85.215.42]) by arlo.cworth.org (Postfix) with ESMTPS id 3E36D6DE009B for ; Mon, 28 Aug 2017 00:39:29 -0700 (PDT) Received: by mail-lf0-f42.google.com with SMTP id z12so15485481lfd.3 for ; Mon, 28 Aug 2017 00:39:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gaute-vetsj-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=jWggl9gwY7tMwp562Vvju8VrvYig9sxeTZfC0I0UM8k=; b=G58afFcUex8NGpQa/KY7VPonHGvyPA/hjvWpoMFnD/+Xfh0t8lh2yhjcygiV/g1XS6 3y2F1/J1Mc4SjCGkDkMq9LUtZR5qOorWdrTcGLSDH5jRV/y/xPkq5AEujkpyiDqfJA6a T7WKnjIxy/vMwXT2OUks0dZ1YJgbkf/1EX9Yh26y8H3f7CT3+zxR/zfIWBba5FyFThvR edMsHKG4n3rlcAxDMX0URQfgSslW/tVVjUEOjW5mXS/TeUdgQloJ8y1AS4T4HD/8V7+j M8mpbgYyISqj0hQWfwDtptoXTT4P9aiZHMttuCP0VuRB7vPo7AP3KR82Ley2aCCI8QBo Gebg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=jWggl9gwY7tMwp562Vvju8VrvYig9sxeTZfC0I0UM8k=; b=LIBXEP8C5QcQcLKQjJGq/4zS1TYATZjLI6TebdvIqyRBel8/aKl3oWob8/OHGLm5hQ sBZd6DUa/20FSOJDXckcWOne9GKmkjRobI0Fw72KTdBrhyCCoixHaYri+Gbk6Ml3lhYT OhHOyrxBSIX2lBAIDJMDipMAzxghiO8DJH45W52d3JM3/5PjNj8iek8YJdldgkOJoTcS jNIsIxRc+pEDosbBGvf5KsG+InDdOyFx0rDuPEJnIf0kb1CsigK8OEaHatP3InxEvReA OU+mG1wX8LL1HHExiuuzEuf7kXPcuByxWrvQ9kzGoLwWTtaKehUtJ2BtDiqveww52NnU Kcig== X-Gm-Message-State: AHYfb5inlTjGM8bwbUK44oHo8ERESx1TS6IBbYnaiL58BvJOu7KtkiAr m0lUiNYTYUgTRWpeblXW5Q== X-Received: by 10.46.83.17 with SMTP id h17mr2456915ljb.186.1503905967159; Mon, 28 Aug 2017 00:39:27 -0700 (PDT) Received: from localhost ([128.39.46.106]) by smtp.gmail.com with ESMTPSA id y1sm2149586lja.86.2017.08.28.00.39.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Aug 2017 00:39:26 -0700 (PDT) From: Gaute Hope To: notmuch@notmuchmail.org Subject: [PATCH] python: deprecated add_message calls index_file correctly and returns result Date: Mon, 28 Aug 2017 09:39:23 +0200 Message-Id: <20170828073923.31442-1-eg@gaute.vetsj.com> X-Mailer: git-send-email 2.14.1 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Aug 2017 07:39:33 -0000 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