]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use string.ascii_letters instead of string.letters.
authorFred Drake <fdrake@acm.org>
Fri, 20 Jul 2001 18:52:02 +0000 (18:52 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 20 Jul 2001 18:52:02 +0000 (18:52 +0000)
Remove unused import.

Lib/nturl2path.py

index fc5357ecd775be2e27fc40a08327241d95f062f3..4fb21487ffe41ef776e11273dbc4897d43dbb39c 100644 (file)
@@ -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] == '\\\\':