summaryrefslogtreecommitdiffstats
path: root/Lib/urllib
diff options
context:
space:
mode:
authorXtreak <tir.karthi@gmail.com>2019-05-19 13:40:06 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2019-05-19 13:40:05 (GMT)
commitc661b30f89ffe7a7995538d3b1649469b184bee4 (patch)
tree9bed1700c823d8f1224b1f6968dfdf0d1b309dc1 /Lib/urllib
parenta5119e7d75c9729fc36c059d05f3d7132e7f6bb4 (diff)
downloadcpython-c661b30f89ffe7a7995538d3b1649469b184bee4.zip
cpython-c661b30f89ffe7a7995538d3b1649469b184bee4.tar.gz
cpython-c661b30f89ffe7a7995538d3b1649469b184bee4.tar.bz2
bpo-36948: Fix NameError in urllib.request.URLopener.retrieve (GH-13389)
Diffstat (limited to 'Lib/urllib')
-rw-r--r--Lib/urllib/request.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index df2ff06..230ac39 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -1783,7 +1783,7 @@ class URLopener:
fp = self.open_local_file(url1)
hdrs = fp.info()
fp.close()
- return url2pathname(splithost(url1)[1]), hdrs
+ return url2pathname(_splithost(url1)[1]), hdrs
except OSError as msg:
pass
fp = self.open(url, data)
@@ -1792,10 +1792,10 @@ class URLopener:
if filename:
tfp = open(filename, 'wb')
else:
- garbage, path = splittype(url)
- garbage, path = splithost(path or "")
- path, garbage = splitquery(path or "")
- path, garbage = splitattr(path or "")
+ garbage, path = _splittype(url)
+ garbage, path = _splithost(path or "")
+ path, garbage = _splitquery(path or "")
+ path, garbage = _splitattr(path or "")
suffix = os.path.splitext(path)[1]
(fd, filename) = tempfile.mkstemp(suffix)
self.__tempfiles.append(filename)