Lennart Regebro avatar Lennart Regebro committed eaacb9f

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

Comments (0)

Files changed (1)

distribute/distribute/_old_code/index/package_index.py

 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])
         else:
             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):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.