jonhadfield / python-hosts

a hosts file manager library written in python
MIT License
125 stars 33 forks source link

utils.is_ipv6 is not supported in Windows #25

Closed baochenw closed 4 years ago

baochenw commented 4 years ago

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'

jonhadfield commented 4 years ago

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.

github-actions[bot] commented 4 years ago

Stale issue message