mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #9329 from mcodd/devel
python2.4 compatibility issue with urlparse
This commit is contained in:
commit
139e4767e4
1 changed files with 4 additions and 2 deletions
|
@ -72,12 +72,14 @@ def get_fqdn(repo_url):
|
|||
if 'ssh' not in parts[0] and 'git' not in parts[0]:
|
||||
# don't try and scan a hostname that's not ssh
|
||||
return None
|
||||
# parts[1] will be empty on python2.4 on ssh:// or git:// urls, so
|
||||
# ensure we actually have a parts[1] before continuing.
|
||||
if parts[1] != '':
|
||||
result = parts[1]
|
||||
if ":" in result:
|
||||
result = result.split(":")[0]
|
||||
if "@" in result:
|
||||
result = result.split("@", 1)[1]
|
||||
if "@" in result:
|
||||
result = result.split("@", 1)[1]
|
||||
|
||||
return result
|
||||
|
||||
|
|
Loading…
Reference in a new issue