summaryrefslogtreecommitdiffstats
path: root/Lib/nturl2path.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-07-20 18:52:02 (GMT)
committerFred Drake <fdrake@acm.org>2001-07-20 18:52:02 (GMT)
commit27eebb8c766ae0d87f7ef17a9436ac4f45274253 (patch)
tree031b01ee25802cd592392b16b1573bac9829bbad /Lib/nturl2path.py
parent960fdf9ac3a15eceebd8dd6882bedaae787fa5fb (diff)
downloadcpython-27eebb8c766ae0d87f7ef17a9436ac4f45274253.zip
cpython-27eebb8c766ae0d87f7ef17a9436ac4f45274253.tar.gz
cpython-27eebb8c766ae0d87f7ef17a9436ac4f45274253.tar.bz2
Use string.ascii_letters instead of string.letters.
Remove unused import.
Diffstat (limited to 'Lib/nturl2path.py')
-rw-r--r--Lib/nturl2path.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/nturl2path.py b/Lib/nturl2path.py
index fc5357e..4fb2148 100644
--- a/Lib/nturl2path.py
+++ b/Lib/nturl2path.py
@@ -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] == '\\\\':