diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2009-08-16 06:44:28 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2009-08-16 06:44:28 (GMT) |
commit | 8eba090694d661d98eb24e6894b0c3e2c5c76ba2 (patch) | |
tree | 95047544eafd7bd921ba3b42f76afd457d12685b /Lib | |
parent | 044446b67cfe108c215ac58ebc71778ca4e73aa5 (diff) | |
download | cpython-8eba090694d661d98eb24e6894b0c3e2c5c76ba2.zip cpython-8eba090694d661d98eb24e6894b0c3e2c5c76ba2.tar.gz cpython-8eba090694d661d98eb24e6894b0c3e2c5c76ba2.tar.bz2 |
Fixing Issue6711 - macurl2path has typos that raise AttributeError
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/macurl2path.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/macurl2path.py b/Lib/macurl2path.py index 11944cf..f22fb20 100644 --- a/Lib/macurl2path.py +++ b/Lib/macurl2path.py @@ -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", |