mirror of
https://github.com/ansible/awx.git
synced 2026-05-22 08:17:39 -02:30
Merge pull request #6944 from AlanCoding/splunk_host
handle Splunk hostname case from support
This commit is contained in:
@@ -160,7 +160,8 @@ class BaseHandler(logging.Handler):
|
||||
"""
|
||||
host = self.host or ''
|
||||
# urlparse requires '//' to be provided if scheme is not specified
|
||||
if not urlparse.urlsplit(host).scheme and not host.startswith('//'):
|
||||
original_parsed = urlparse.urlsplit(host)
|
||||
if (not original_parsed.scheme and not host.startswith('//')) or original_parsed.hostname is None:
|
||||
host = '%s://%s' % (scheme, host) if scheme else '//%s' % host
|
||||
parsed = urlparse.urlsplit(host)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user