Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ccf2d6d2
Commit
ccf2d6d2
authored
Mar 30, 1998
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A few lines were indented using spaces instead of tabs -- fix them.
parent
13fe6ca1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
Lib/urllib.py
Lib/urllib.py
+8
-8
No files found.
Lib/urllib.py
View file @
ccf2d6d2
...
...
@@ -139,7 +139,7 @@ class URLopener:
fp
=
open
(
filename
,
'rb'
)
return
addinfourl
(
fp
,
headers
,
fullurl
)
type
,
url
=
splittype
(
fullurl
)
if
not
type
:
type
=
'file'
if
not
type
:
type
=
'file'
if
self
.
proxies
.
has_key
(
type
):
proxy
=
self
.
proxies
[
type
]
type
,
proxy
=
splittype
(
proxy
)
...
...
@@ -751,7 +751,7 @@ def splithost(url):
import
re
_hostprog
=
re
.
compile
(
'^//([^/]+)(.*)$'
)
match
=
_hostprog
.
match
(
url
)
match
=
_hostprog
.
match
(
url
)
if
match
:
return
match
.
group
(
1
,
2
)
return
None
,
url
...
...
@@ -762,7 +762,7 @@ def splituser(host):
import
re
_userprog
=
re
.
compile
(
'^([^@]*)@(.*)$'
)
match
=
_userprog
.
match
(
host
)
match
=
_userprog
.
match
(
host
)
if
match
:
return
match
.
group
(
1
,
2
)
return
None
,
host
...
...
@@ -773,7 +773,7 @@ def splitpasswd(user):
import
re
_passwdprog
=
re
.
compile
(
'^([^:]*):(.*)$'
)
match
=
_passwdprog
.
match
(
user
)
match
=
_passwdprog
.
match
(
user
)
if
match
:
return
match
.
group
(
1
,
2
)
return
user
,
None
...
...
@@ -784,7 +784,7 @@ def splitport(host):
import
re
_portprog
=
re
.
compile
(
'^(.*):([0-9]+)$'
)
match
=
_portprog
.
match
(
host
)
match
=
_portprog
.
match
(
host
)
if
match
:
return
match
.
group
(
1
,
2
)
return
host
,
None
...
...
@@ -799,7 +799,7 @@ def splitnport(host, defport=-1):
import
re
_nportprog
=
re
.
compile
(
'^(.*):(.*)$'
)
match
=
_nportprog
.
match
(
host
)
match
=
_nportprog
.
match
(
host
)
if
match
:
host
,
port
=
match
.
group
(
1
,
2
)
try
:
...
...
@@ -817,7 +817,7 @@ def splitquery(url):
import
re
_queryprog
=
re
.
compile
(
'^(.*)
\
?([^?]*)$
'
)
match = _queryprog.match(url)
match = _queryprog.match(url)
if match: return match.group(1, 2)
return url, None
...
...
@@ -828,7 +828,7 @@ def splittag(url):
import re
_tagprog = re.compile('
^
(.
*
)
#([^#]*)$')
match
=
_tagprog
.
match
(
url
)
match
=
_tagprog
.
match
(
url
)
if
match
:
return
match
.
group
(
1
,
2
)
return
url
,
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment