Merge pull request #47341 from dwoz/inet_pton_fix

Fix python 3 support for inet_pton function
This commit is contained in:
Daniel Wozniak 2018-04-26 16:35:44 -07:00 committed by GitHub
commit 34e78ef564
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,7 +56,7 @@ def inet_pton(address_family, ip_string):
addr_size = ctypes.c_int(ctypes.sizeof(addr))
if WSAStringToAddressA(
ip_string,
ip_string.encode('ascii'),
address_family,
None,
ctypes.byref(addr),