Add workaround for broken urlparse.
Fixes bug 905010. urlparse on Python 2.6.1 on OSX can't parse the ssh urls properly. So we special case commando it if the parse failure follows the way that the broken urlparse will mis-parse the string. Change-Id: I1a550fce77e596d2529436e4024792e9c86d2e4e
This commit is contained in:
@@ -207,6 +207,11 @@ def split_hostname(fetch_url):
|
|||||||
hostname = parsed_url.netloc
|
hostname = parsed_url.netloc
|
||||||
port = 22
|
port = 22
|
||||||
|
|
||||||
|
# Workaround bug in urlparse on OSX
|
||||||
|
if parsed_url.scheme == "ssh" and hostname[:2] == "//":
|
||||||
|
hostname = hostname[2:]
|
||||||
|
hostname = hostname.split("/")[0]
|
||||||
|
|
||||||
if "@" in hostname:
|
if "@" in hostname:
|
||||||
(username, hostname) = hostname.split("@")
|
(username, hostname) = hostname.split("@")
|
||||||
if ":" in hostname:
|
if ":" in hostname:
|
||||||
|
Reference in New Issue
Block a user