Skip to content

Commit 9fb1a8e

Browse files
committed
Tweaked an import to make Python 2to3 able to handle it.
- Legacy-Id: 12922
1 parent 84527c9 commit 9fb1a8e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ietf/utils/test_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
import sys
3838
import html5lib
3939
from datetime import datetime
40-
import urllib2 as urllib
40+
import urllib2
4141
from difflib import unified_diff
4242
from unittest.util import strclass
4343

@@ -99,7 +99,7 @@ def read_testurls(filename):
9999
def split_url(url):
100100
if "?" in url:
101101
url, args = url.split("?", 1)
102-
args = dict([ map(urllib.unquote,arg.split("=", 1)) for arg in args.split("&") if "=" in arg ])
102+
args = dict([ map(urllib2.unquote,arg.split("=", 1)) for arg in args.split("&") if "=" in arg ])
103103
else:
104104
args = {}
105105
return url, args
@@ -216,7 +216,7 @@ def doDiff(self, tuple, response):
216216
print " Fetching "+refurl
217217
refhtml = None
218218
try:
219-
mfile = urllib.urlopen(refurl)
219+
mfile = urllib2.urlopen(refurl)
220220
refhtml = mfile.read()
221221
mfile.close()
222222
except Exception, e:

0 commit comments

Comments
 (0)