diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status index 3aa83b62..22b6b104 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'])