mirror of https://github.com/python/cpython
Oops, pulled over by the tab police :-)
This commit is contained in:
parent
b5916ab065
commit
0454b51282
|
@ -178,7 +178,7 @@ class URLopener:
|
||||||
if not filename and (not type or type == 'file'):
|
if not filename and (not type or type == 'file'):
|
||||||
try:
|
try:
|
||||||
fp = self.open_local_file(url1)
|
fp = self.open_local_file(url1)
|
||||||
hdrs = fp.info()
|
hdrs = fp.info()
|
||||||
del fp
|
del fp
|
||||||
return url2pathname(splithost(url1)[1]), hdrs
|
return url2pathname(splithost(url1)[1]), hdrs
|
||||||
except IOError, msg:
|
except IOError, msg:
|
||||||
|
@ -187,14 +187,14 @@ class URLopener:
|
||||||
headers = fp.info()
|
headers = fp.info()
|
||||||
if not filename:
|
if not filename:
|
||||||
import tempfile
|
import tempfile
|
||||||
garbage, path = splittype(url)
|
garbage, path = splittype(url)
|
||||||
print (garbage, path)
|
print (garbage, path)
|
||||||
garbage, path = splithost(path or "")
|
garbage, path = splithost(path or "")
|
||||||
print (garbage, path)
|
print (garbage, path)
|
||||||
path, garbage = splitquery(path or "")
|
path, garbage = splitquery(path or "")
|
||||||
print (path, garbage)
|
print (path, garbage)
|
||||||
path, garbage = splitattr(path or "")
|
path, garbage = splitattr(path or "")
|
||||||
print (path, garbage)
|
print (path, garbage)
|
||||||
suffix = os.path.splitext(path)[1]
|
suffix = os.path.splitext(path)[1]
|
||||||
filename = tempfile.mktemp(suffix)
|
filename = tempfile.mktemp(suffix)
|
||||||
self.__tempfiles.append(filename)
|
self.__tempfiles.append(filename)
|
||||||
|
|
Loading…
Reference in New Issue