Commit 27eebb8c authored by Fred Drake's avatar Fred Drake

Use string.ascii_letters instead of string.letters.

Remove unused import.
parent 960fdf9a
...@@ -21,7 +21,7 @@ def url2pathname(url): ...@@ -21,7 +21,7 @@ def url2pathname(url):
# make sure not to convert quoted slashes :-) # make sure not to convert quoted slashes :-)
return urllib.unquote('\\'.join(components)) return urllib.unquote('\\'.join(components))
comp = url.split('|') 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 error = 'Bad URL: ' + url
raise IOError, error raise IOError, error
drive = comp[0][-1].upper() drive = comp[0][-1].upper()
...@@ -42,7 +42,7 @@ def pathname2url(p): ...@@ -42,7 +42,7 @@ def pathname2url(p):
///C|/foo/bar/spam.foo ///C|/foo/bar/spam.foo
""" """
import string, urllib import urllib
if not ':' in p: if not ':' in p:
# No drive specifier, just convert slashes and quote the name # No drive specifier, just convert slashes and quote the name
if p[:2] == '\\\\': if p[:2] == '\\\\':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment