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