[PATCH 1/1] nmbug-status: replace __values__() with values() in OrderedDict stub
authorTomi Ollila <tomi.ollila@iki.fi>
Tue, 18 Feb 2014 18:34:52 +0000 (20:34 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:00:03 +0000 (10:00 -0800)
30/5c646e9a83a0a39140e87354b81fdf4abb0df7 [new file with mode: 0644]

diff --git a/30/5c646e9a83a0a39140e87354b81fdf4abb0df7 b/30/5c646e9a83a0a39140e87354b81fdf4abb0df7
new file mode 100644 (file)
index 0000000..3927548
--- /dev/null
@@ -0,0 +1,68 @@
+Return-Path: <too@guru-group.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 0AF8C431FBF\r
+       for <notmuch@notmuchmail.org>; Tue, 18 Feb 2014 10:35:05 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id EAtH39qPEHn2 for <notmuch@notmuchmail.org>;\r
+       Tue, 18 Feb 2014 10:35:01 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 933F3431FBD\r
+       for <notmuch@notmuchmail.org>; Tue, 18 Feb 2014 10:35:01 -0800 (PST)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+       id 55FC5100063; Tue, 18 Feb 2014 20:34:53 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/1] nmbug-status: replace __values__() with values() in\r
+       OrderedDict stub\r
+Date: Tue, 18 Feb 2014 20:34:52 +0200\r
+Message-Id: <1392748492-29341-1-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 1.8.0\r
+Cc: tomi.ollila@iki.fi\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 18 Feb 2014 18:35:05 -0000\r
+\r
+Python dict() object does not have __values__() function which\r
+OrderedDict().values() (the stub provided in nmbug-status) could call\r
+to provide ordered list of values. By renaming this thinko to\r
+values() will make our stub work as expected -- dict items listed out\r
+in order those were added to the dictionary.\r
+---\r
+ devel/nmbug/nmbug-status | 2 +-\r
+ 1 file changed, 1 insertion(+), 1 deletion(-)\r
+\r
+diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status\r
+index ef7169a..6b2572c 100755\r
+--- a/devel/nmbug/nmbug-status\r
++++ b/devel/nmbug/nmbug-status\r
+@@ -41,7 +41,7 @@ if not hasattr(collections, 'OrderedDict'):  # Python 2.6 or earlier\r
+             super(_OrderedDict, self).__setitem__(key, value)\r
+             self._keys.append(key)\r
\r
+-        def __values__(self):\r
++        def values(self):\r
+             for key in self._keys:\r
+                 yield self[key]\r
\r
+-- \r
+1.8.0\r
+\r