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
8eba0906
Commit
8eba0906
authored
Aug 16, 2009
by
Senthil Kumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing Issue6711 - macurl2path has typos that raise AttributeError
parent
044446b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Lib/macurl2path.py
Lib/macurl2path.py
+3
-3
No files found.
Lib/macurl2path.py
View file @
8eba0906
...
...
@@ -13,7 +13,7 @@ def url2pathname(pathname):
#
# XXXX The .. handling should be fixed...
#
tp
=
urllib
.
parsesplittype
(
pathname
)[
0
]
tp
=
urllib
.
parse
.
splittype
(
pathname
)[
0
]
if
tp
and
tp
!=
'file'
:
raise
RuntimeError
(
'Cannot convert non-local URL to pathname'
)
# Turn starting /// into /, an empty hostname means current host
...
...
@@ -47,7 +47,7 @@ def url2pathname(pathname):
i
=
i
+
1
rv
=
':'
+
':'
.
join
(
components
)
# and finally unquote slashes and other funny characters
return
urllib
.
parseunquote
(
rv
)
return
urllib
.
parse
.
unquote
(
rv
)
def
pathname2url
(
pathname
):
"""OS-specific conversion from a file system path to a relative URL
...
...
@@ -74,7 +74,7 @@ def pathname2url(pathname):
def
_pncomp2url
(
component
):
# We want to quote slashes
return
urllib
.
parsequote
(
component
[:
31
],
safe
=
''
)
return
urllib
.
parse
.
quote
(
component
[:
31
],
safe
=
''
)
def
test
():
for
url
in
[
"index.html"
,
...
...
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