From 95907bcc8ddc3f87e46fdc6b9518d3c2f2a015ed Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Tue, 9 Oct 2012 18:38:21 +0200 Subject: Fix cause of test failure on Mac OS X. Refs #20. --HG-- branch : distribute extra : rebase_source : 92ba8151d6dfa3755b31139a9b5ada570183731d --- setuptools/package_index.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'setuptools/package_index.py') diff --git a/setuptools/package_index.py b/setuptools/package_index.py index d0896feb..ffbffa99 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -779,6 +779,12 @@ def open_with_auth(url): scheme, netloc, path, params, query, frag = urlparse.urlparse(url) + # Double scheme does not raise on Mac OS X as revealed by a + # failing test. We would expect "nonnumeric port". Refs #20. + if sys.platform == 'darwin': + if netloc.endswith(':'): + raise httplib.InvalidURL("nonnumeric port: ''") + if scheme in ('http', 'https'): auth, host = urllib2.splituser(netloc) else: @@ -859,4 +865,4 @@ def local_open(url): -# this line is a kludge to keep the trailing blank lines for pje's editor \ No newline at end of file +# this line is a kludge to keep the trailing blank lines for pje's editor -- cgit v1.2.3