Actually fix the urlparse bug in OSX.
On OSX, if fed this: ssh://mordred@review.openstack.org:29418/openstack-ci/git-review.git urlparse returns this: ParseResult(scheme='ssh', netloc='', path='//mordred@review.openstack.org:29418/openstack-ci/git-review.git', params='', query='', fragment='') Instead of ParseResult(scheme='ssh', netloc='mordred@review.openstack.org:29418', path='/openstack-ci/git-review.git', params='', query='', fragment='') Change-Id: I003e2f809df8d7dc92ecb8bfb4f772f09f6dc8ee
This commit is contained in:
parent
e0e1b87138
commit
f719a31954
@ -220,11 +220,8 @@ def split_hostname(fetch_url):
|
||||
port = 22
|
||||
|
||||
# Workaround bug in urlparse on OSX
|
||||
if parsed_url.scheme == "ssh" and hostname[:2] == "//":
|
||||
hostname = hostname[2:].split("/")[0]
|
||||
# Workaround bug in urlparse on OSX
|
||||
elif parsed_url.scheme == "ssh" and hostname[:2] == "//":
|
||||
hostname = hostname[2:].split("/")[0]
|
||||
if parsed_url.scheme == "ssh" and parsed_url.path[:2] == "//":
|
||||
hostname = parsed_url.path[2:].split("/")[0]
|
||||
|
||||
if "@" in hostname:
|
||||
(username, hostname) = hostname.split("@")
|
||||
|
Loading…
x
Reference in New Issue
Block a user