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
27eebb8c
Commit
27eebb8c
authored
Jul 20, 2001
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use string.ascii_letters instead of string.letters.
Remove unused import.
parent
960fdf9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Lib/nturl2path.py
Lib/nturl2path.py
+2
-2
No files found.
Lib/nturl2path.py
View file @
27eebb8c
...
...
@@ -21,7 +21,7 @@ def url2pathname(url):
# make sure not to convert quoted slashes :-)
return
urllib
.
unquote
(
'
\
\
'
.
join
(
components
))
comp
=
url
.
split
(
'|'
)
if
len
(
comp
)
!=
2
or
comp
[
0
][
-
1
]
not
in
string
.
letters
:
if
len
(
comp
)
!=
2
or
comp
[
0
][
-
1
]
not
in
string
.
ascii_
letters
:
error
=
'Bad URL: '
+
url
raise
IOError
,
error
drive
=
comp
[
0
][
-
1
].
upper
()
...
...
@@ -42,7 +42,7 @@ def pathname2url(p):
///C|/foo/bar/spam.foo
"""
import
string
,
urllib
import
urllib
if
not
':'
in
p
:
# No drive specifier, just convert slashes and quote the name
if
p
[:
2
]
==
'
\
\
\
\
'
:
...
...
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