jonhadfield/python-hosts

utils.is_ipv6 is not supported in Windows

Closed this issue · 2 comments

File "C:\Python27\lib\site-packages\python_hosts\hosts.py", line 144, in init
self.populate_entries()
File "C:\Python27\lib\site-packages\python_hosts\hosts.py", line 435, in populate_entries
entry_type = HostsEntry.get_entry_type(hosts_entry)
File "C:\Python27\lib\site-packages\python_hosts\hosts.py", line 103, in get_entry_type
if is_ipv6(entry_chunks[0]):
File "C:\Python27\lib\site-packages\python_hosts\utils.py", line 31, in is_ipv6
if socket.inet_pton(socket.AF_INET6, entry):
AttributeError: 'module' object has no attribute 'inet_pton'

Thanks for reporting.
I've just published a new release (https://github.com/jonhadfield/python-hosts/releases/tag/1.0.0) that should fix this.

Stale issue message