[PATCH v2 02/20] nmbug-status: Use email.utils instead of rfc822
authorW. Trevor King <wking@tremily.us>
Mon, 10 Feb 2014 18:40:23 +0000 (10:40 +1600)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:59:51 +0000 (09:59 -0800)
12/b169ab2f8bd9ae802dbcc55aa5d5c64e3d97ea [new file with mode: 0644]

diff --git a/12/b169ab2f8bd9ae802dbcc55aa5d5c64e3d97ea b/12/b169ab2f8bd9ae802dbcc55aa5d5c64e3d97ea
new file mode 100644 (file)
index 0000000..b5c8133
--- /dev/null
@@ -0,0 +1,103 @@
+Return-Path: <wking@tremily.us>\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 24F19429E2E\r
+       for <notmuch@notmuchmail.org>; Mon, 10 Feb 2014 10:42:03 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\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\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001]\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 sXUopSH68hxU for <notmuch@notmuchmail.org>;\r
+       Mon, 10 Feb 2014 10:41:55 -0800 (PST)\r
+Received: from qmta04.westchester.pa.mail.comcast.net\r
+       (qmta04.westchester.pa.mail.comcast.net [76.96.62.40])\r
+       by olra.theworths.org (Postfix) with ESMTP id 4E476431FBD\r
+       for <notmuch@notmuchmail.org>; Mon, 10 Feb 2014 10:41:55 -0800 (PST)\r
+Received: from omta23.westchester.pa.mail.comcast.net ([76.96.62.74])\r
+       by qmta04.westchester.pa.mail.comcast.net with comcast\r
+       id QcWA1n0041c6gX854ihuBh; Mon, 10 Feb 2014 18:41:54 +0000\r
+Received: from odin.tremily.us ([24.18.63.50])\r
+       by omta23.westchester.pa.mail.comcast.net with comcast\r
+       id Qiht1n007152l3L3jiht9S; Mon, 10 Feb 2014 18:41:54 +0000\r
+Received: from mjolnir.tremily.us (unknown [192.168.0.140])\r
+       by odin.tremily.us (Postfix) with ESMTPS id C322710167A5;\r
+       Mon, 10 Feb 2014 10:41:52 -0800 (PST)\r
+Received: (nullmailer pid 1246 invoked by uid 1000);\r
+       Mon, 10 Feb 2014 18:40:44 -0000\r
+From: "W. Trevor King" <wking@tremily.us>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 02/20] nmbug-status: Use email.utils instead of rfc822\r
+Date: Mon, 10 Feb 2014 10:40:23 -0800\r
+Message-Id:\r
+ <b04b828953b72ef3d444aba4cfc96cff68f47231.1392056624.git.wking@tremily.us>\r
+X-Mailer: git-send-email 1.8.5.2.8.g0f6c0d1\r
+In-Reply-To: <cover.1392056624.git.wking@tremily.us>\r
+References: <cover.1392056624.git.wking@tremily.us>\r
+In-Reply-To: <cover.1392056624.git.wking@tremily.us>\r
+References: <cover.1392056624.git.wking@tremily.us>\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
+       s=q20121106; t=1392057714;\r
+       bh=MSPQvFkXROxe4kd3DfB67nEC6G5pbh8GAGl/oeKkuTw=;\r
+       h=Received:Received:Received:Received:From:To:Subject:Date:\r
+       Message-Id;\r
+       b=k8XNXsJaIidgQ89t2gxTLsEPx3ElVfwqCjOe2DJCUZvJtPg8MF3/Le24svfmB5Unf\r
+       s0Jvjjm1LICqfq6D4+e+1RuvcW3xi4LMk+Ib4s9iB7dZjVwJJVlwz9laYnGiYLik55\r
+       2etUeXRpEah0jRCB8mQo0eOa8gwUL44o5BpjVGxv0uSvG83bunf2x8SJ+sge2c3B4U\r
+       +h03cDqFM/gBekJ8C7Q6/RlUnvy4Y3ZMnElwei4DtTwuQDUjHDWXO5/smXWMPDrbTq\r
+       1WZ/Qo5EzH9e2UZMIY4qSOJ3/Ndt9pEIDqitdHtwfQQ8VZdZU2qJb634ZjZYlWt0I+\r
+       Lzal0Z4m6zOlg==\r
+Cc: Tomi Ollila <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: Mon, 10 Feb 2014 18:42:03 -0000\r
+\r
+rfc822 has been deprecated since Python 2.3, and it's gone in\r
+Python 3 [1].\r
+\r
+[1]: http://docs.python.org/2/library/rfc822.html\r
+---\r
+ devel/nmbug/nmbug-status | 4 ++--\r
+ 1 file changed, 2 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status\r
+index b1feee9..6525176 100755\r
+--- a/devel/nmbug/nmbug-status\r
++++ b/devel/nmbug/nmbug-status\r
+@@ -9,7 +9,7 @@\r
+ from __future__ import print_function\r
\r
+ import datetime\r
+-import rfc822\r
++import email.utils\r
+ import urllib\r
+ import json\r
+ import argparse\r
+@@ -128,7 +128,7 @@ def print_view(title, query, comment):\r
+                 val = str.join(' ', val.split(None)[1:4])\r
+                 val = str(datetime.datetime.strptime(val, '%d %b %Y').date())\r
+             elif header == 'from':\r
+-                (val, addr) = rfc822.parseaddr(val)\r
++                (val, addr) = email.utils.parseaddr(val)\r
+                 if val == '':\r
+                     val = addr.split('@')[0]\r
\r
+-- \r
+1.8.5.2.8.g0f6c0d1\r
+\r