Merge "Add TypeError exception when parsing addresses" into stable/wallaby
This commit is contained in:
commit
f6181ad8b6
|
@ -23,5 +23,5 @@ def bracket_ipv6(address):
|
|||
try:
|
||||
socket.inet_pton(socket.AF_INET6, address)
|
||||
return "[%s]" % address
|
||||
except socket.error:
|
||||
except (socket.error, TypeError):
|
||||
return address
|
||||
|
|
|
@ -90,8 +90,11 @@ def _create_overcloudrc_from_outputs(
|
|||
|
||||
host = urllib.parse.urlparse(endpoint).hostname
|
||||
no_proxy_list = no_proxy.split(',')
|
||||
no_proxy_list = map(common_utils.bracket_ipv6,
|
||||
no_proxy_list + [host, admin_vip])
|
||||
no_proxy_list.extend([host, admin_vip])
|
||||
no_proxy_list = map(
|
||||
common_utils.bracket_ipv6,
|
||||
[i for i in no_proxy_list if i]
|
||||
)
|
||||
|
||||
# Remove duplicated entries
|
||||
no_proxy_list = sorted(list(set(no_proxy_list)))
|
||||
|
|
Loading…
Reference in New Issue