Commit 95907bcc authored by Stefan H. Holek's avatar Stefan H. Holek

Fix cause of test failure on Mac OS X. Refs #20.

--HG--
branch : distribute
extra : rebase_source : 92ba8151d6dfa3755b31139a9b5ada570183731d
parent 0d407a39
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment