Use six.text_type instead of six.u

This commit is contained in:
twangboy 2018-02-27 12:26:51 -07:00
parent adc8950bbe
commit 46f1d2cc09
No known key found for this signature in database
GPG key ID: 93FF3BDEB278C9EB

View file

@ -37,7 +37,7 @@ def inet_pton(address_family, ip_string):
# This will catch IP Addresses such as 10.1.2
if address_family == socket.AF_INET:
try:
ipaddress.ip_address(six.u(ip_string))
ipaddress.ip_address(six.text_type(ip_string))
except ValueError:
raise socket.error('illegal IP address string passed to inet_pton')
return socket.inet_aton(ip_string)