jonhadfield / python-hosts

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

remove_all_matching assumes it's being passed a single name but is frequently called with a list if names #13

Closed graemerobertson closed 7 years ago

graemerobertson commented 7 years ago

For example, here we call remove_all_matching with a list of names to match on. However, the remove_all_matching implentation assumes it's being passed a single host name.

This means that, for example, when you try and add an entry for 127.0.0.1 with the force flag set, old entries for 127.0.0.1 don't get removed even though they should do.

jonhadfield commented 7 years ago

I've pushed a potential fix and some additional tests. Could you try again with tag 0.3.9? pip install https://github.com/jonhadfield/python-hosts/archive/0.3.9.zip

graemerobertson commented 7 years ago

Yep, seems good! :shipit:

jonhadfield commented 7 years ago

Shipped. Thanks!