Closed bbeausej closed 7 years ago
Thanks for reporting @bbeausej. I've just added some tests and pushed a fix in release 0.3.6. Please let me know if this fixes it for you.
Hi Jon, Giving it a spin now. Will report in a few.
Yessir! This fixes the reported issue.
Thanks for checking it out quickly!
-b
PR #6 that was merged in 03.4 breaks remove_all_matching for line identified as comments.
Since entry.names is initialized as None by default, comment entries have a None value in the names property. The filtering used in remove_all_matching() in 0.3.4 breaks in those cases.
To replicate simply have a hosts file with comments and invoke remove_all_matching(None, name) to remove an entry by name.