1. Fred Drake
  2. distribute


Lennart Regebro  committed eaacb9f

Import url2pathname from the right library, to let 2to3 work.

  • Participants
  • Parent commits cced618
  • Branches default

Comments (0)

Files changed (1)

File distribute/distribute/_old_code/index/package_index.py

View file
  • Ignore whitespace
 import urlparse
 import shutil
 import cStringIO
+import urllib
 import urllib2
 import httplib
 from distutils import log
         if scheme=='svn' or scheme.startswith('svn+'):
             return self._download_svn(url, filename)
         elif scheme=='file':
-            return urllib2.url2pathname(urlparse.urlparse(url)[2])
+            return urllib.url2pathname(urlparse.urlparse(url)[2])
             self.url_ok(url, True)   # raises error if not allowed
             return self._attempt_download(url, filename)
 def local_open(url):
     """Read a local path, with special support for directories"""
     scheme, server, path, param, query, frag = urlparse.urlparse(url)
-    filename = urllib2.url2pathname(path)
+    filename = urllib.url2pathname(path)
     if os.path.isfile(filename):
         return urllib2.urlopen(url)
     elif path.endswith('/') and os.path.isdir(filename):