aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/package_index.py
diff options
context:
space:
mode:
authorLennart Regebro <regebro@gmail.com>2010-07-24 12:55:44 +0100
committerLennart Regebro <regebro@gmail.com>2010-07-24 12:55:44 +0100
commitfadd3a199f2c99ef0fb5d58e78016274cad6cc20 (patch)
tree6eb39fffc9e59da3d5e81aeb2abbc5e1abb11a24 /setuptools/package_index.py
parent0853c24ca247b6e7abf19adf3c605b241c8d9e88 (diff)
downloadexternal_python_setuptools-fadd3a199f2c99ef0fb5d58e78016274cad6cc20.tar.gz
external_python_setuptools-fadd3a199f2c99ef0fb5d58e78016274cad6cc20.tar.bz2
external_python_setuptools-fadd3a199f2c99ef0fb5d58e78016274cad6cc20.zip
Importing url2pathname from the correct place, so 2to3 can do it's job.
--HG-- branch : distribute extra : rebase_source : 43178821d2b4776dbfdf5ad9493bca8dc401b048
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-xsetuptools/package_index.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index 1d467f78..1f9b6bd8 100755
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -1,5 +1,5 @@
"""PyPI and direct package downloading"""
-import sys, os.path, re, urlparse, urllib2, shutil, random, socket, cStringIO
+import sys, os.path, re, urlparse, urllib, urllib2, shutil, random, socket, cStringIO
import httplib
from pkg_resources import *
from distutils import log
@@ -642,7 +642,7 @@ class PackageIndex(Environment):
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)
@@ -791,7 +791,7 @@ def fix_sf_url(url):
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):