A few lines were indented using spaces instead of tabs -- fix them.
This commit is contained in:
parent
117a5a8138
commit
a08fabad72
|
@ -139,7 +139,7 @@ class URLopener:
|
||||||
fp = open(filename, 'rb')
|
fp = open(filename, 'rb')
|
||||||
return addinfourl(fp, headers, fullurl)
|
return addinfourl(fp, headers, fullurl)
|
||||||
type, url = splittype(fullurl)
|
type, url = splittype(fullurl)
|
||||||
if not type: type = 'file'
|
if not type: type = 'file'
|
||||||
if self.proxies.has_key(type):
|
if self.proxies.has_key(type):
|
||||||
proxy = self.proxies[type]
|
proxy = self.proxies[type]
|
||||||
type, proxy = splittype(proxy)
|
type, proxy = splittype(proxy)
|
||||||
|
@ -751,7 +751,7 @@ def splithost(url):
|
||||||
import re
|
import re
|
||||||
_hostprog = re.compile('^//([^/]+)(.*)$')
|
_hostprog = re.compile('^//([^/]+)(.*)$')
|
||||||
|
|
||||||
match = _hostprog.match(url)
|
match = _hostprog.match(url)
|
||||||
if match: return match.group(1, 2)
|
if match: return match.group(1, 2)
|
||||||
return None, url
|
return None, url
|
||||||
|
|
||||||
|
@ -762,7 +762,7 @@ def splituser(host):
|
||||||
import re
|
import re
|
||||||
_userprog = re.compile('^([^@]*)@(.*)$')
|
_userprog = re.compile('^([^@]*)@(.*)$')
|
||||||
|
|
||||||
match = _userprog.match(host)
|
match = _userprog.match(host)
|
||||||
if match: return match.group(1, 2)
|
if match: return match.group(1, 2)
|
||||||
return None, host
|
return None, host
|
||||||
|
|
||||||
|
@ -773,7 +773,7 @@ def splitpasswd(user):
|
||||||
import re
|
import re
|
||||||
_passwdprog = re.compile('^([^:]*):(.*)$')
|
_passwdprog = re.compile('^([^:]*):(.*)$')
|
||||||
|
|
||||||
match = _passwdprog.match(user)
|
match = _passwdprog.match(user)
|
||||||
if match: return match.group(1, 2)
|
if match: return match.group(1, 2)
|
||||||
return user, None
|
return user, None
|
||||||
|
|
||||||
|
@ -784,7 +784,7 @@ def splitport(host):
|
||||||
import re
|
import re
|
||||||
_portprog = re.compile('^(.*):([0-9]+)$')
|
_portprog = re.compile('^(.*):([0-9]+)$')
|
||||||
|
|
||||||
match = _portprog.match(host)
|
match = _portprog.match(host)
|
||||||
if match: return match.group(1, 2)
|
if match: return match.group(1, 2)
|
||||||
return host, None
|
return host, None
|
||||||
|
|
||||||
|
@ -799,7 +799,7 @@ def splitnport(host, defport=-1):
|
||||||
import re
|
import re
|
||||||
_nportprog = re.compile('^(.*):(.*)$')
|
_nportprog = re.compile('^(.*):(.*)$')
|
||||||
|
|
||||||
match = _nportprog.match(host)
|
match = _nportprog.match(host)
|
||||||
if match:
|
if match:
|
||||||
host, port = match.group(1, 2)
|
host, port = match.group(1, 2)
|
||||||
try:
|
try:
|
||||||
|
@ -817,7 +817,7 @@ def splitquery(url):
|
||||||
import re
|
import re
|
||||||
_queryprog = re.compile('^(.*)\?([^?]*)$')
|
_queryprog = re.compile('^(.*)\?([^?]*)$')
|
||||||
|
|
||||||
match = _queryprog.match(url)
|
match = _queryprog.match(url)
|
||||||
if match: return match.group(1, 2)
|
if match: return match.group(1, 2)
|
||||||
return url, None
|
return url, None
|
||||||
|
|
||||||
|
@ -828,7 +828,7 @@ def splittag(url):
|
||||||
import re
|
import re
|
||||||
_tagprog = re.compile('^(.*)#([^#]*)$')
|
_tagprog = re.compile('^(.*)#([^#]*)$')
|
||||||
|
|
||||||
match = _tagprog.match(url)
|
match = _tagprog.match(url)
|
||||||
if match: return match.group(1, 2)
|
if match: return match.group(1, 2)
|
||||||
return url, None
|
return url, None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue