From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 1A5F4431FBD for ; Mon, 10 Feb 2014 10:44:51 -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 Qx42ZzkYSMSg for ; Mon, 10 Feb 2014 10:44:45 -0800 (PST) Received: from qmta13.westchester.pa.mail.comcast.net (qmta13.westchester.pa.mail.comcast.net [76.96.59.243]) by olra.theworths.org (Postfix) with ESMTP id 4FA49431FDF for ; Mon, 10 Feb 2014 10:43:57 -0800 (PST) Received: from omta11.westchester.pa.mail.comcast.net ([76.96.62.36]) by qmta13.westchester.pa.mail.comcast.net with comcast id Qcvh1n0010mv7h05Dijx9h; Mon, 10 Feb 2014 18:43:57 +0000 Received: from odin.tremily.us ([24.18.63.50]) by omta11.westchester.pa.mail.comcast.net with comcast id Qihw1n00B152l3L3XihwvR; Mon, 10 Feb 2014 18:41:57 +0000 Received: from mjolnir.tremily.us (unknown [192.168.0.140]) by odin.tremily.us (Postfix) with ESMTPS id EE86110167B3; Mon, 10 Feb 2014 10:41:55 -0800 (PST) Received: (nullmailer pid 1263 invoked by uid 1000); Mon, 10 Feb 2014 18:40:45 -0000 From: "W. Trevor King" To: notmuch@notmuchmail.org Subject: [PATCH v2 09/20] nmbug-status: Add a Python-3-compatible urllib.parse.quote import Date: Mon, 10 Feb 2014 10:40:30 -0800 Message-Id: <80d27fa376ab1c214396c24fb0268a96293a4d87.1392056624.git.wking@tremily.us> 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=1392057837; bh=+RYjUyYKWkd/LXfnYi2JOZZTp5ecx1cOBgcyXSpm2TU=; h=Received:Received:Received:Received:From:To:Subject:Date: Message-Id; b=ES/ddDd5OLdo3lLUMCYGisRcMX1gPnQQpQP9vZrkzL7mOpqG1qQZXNYXuCCXIM16U ximhdPlnokuZMY+Sf80JYlDrnKRB1laZvEDrSLRkwjKxIdxqe7vxgkIbCRbACJo7Qs pGSolxPtRcDmE3GaH76U3ujF4z2ijJcIo2/KNAICW8dLJBZuk4rD8TBsjeveVnCfYr luByPyxf2qVyL3DqyvUHZdAkR1VKutHkHL9279IUaNRFRczv9QsscfnuKhZqtYontv RdRLmgwAMi2tcCyQXXN3cAfVxuGbWUBG21bv6ZAHjPSrMJKws+9/VFOIswZRTn3kB+ 5/5Nl4KNK5ogA== 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:44:51 -0000 Python 2's urllib.quote [1] has moved to urllib.parse.quote in Python 3 [2]. [1]: http://docs.python.org/2/library/urllib.html#urllib.quote [2]: http://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote --- devel/nmbug/nmbug-status | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status index 3aa83b6..22b6b10 100755 --- a/devel/nmbug/nmbug-status +++ b/devel/nmbug/nmbug-status @@ -12,7 +12,10 @@ import codecs import datetime import email.utils import locale -import urllib +try: # Python 3 + from urllib.parse import quote +except ImportError: # Python 2 + from urllib import quote import json import argparse import os @@ -124,8 +127,8 @@ def print_view(database, title, query, comment, if output_format == 'html': - out['subject'] = '%s' \ - % (urllib.quote(mid), out['subject']) + out['subject'] = '%s' % ( + quote(mid), out['subject']) lines.append(' %s' % out['date']) lines.append('%s' % out['id']) -- 1.8.5.2.8.g0f6c0d1