I've got below error when i was trying to remove_all_matching by using name or set the force=True in adding a host record.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/python_hosts/hosts.py", line 371, in add
self.remove_all_matching(name=entry.names)
File "/usr/local/lib/python2.7/dist-packages/python_hosts/hosts.py", line 264, in remove_all_matching
self.entries = list(filter(func, self.entries))
File "/usr/local/lib/python2.7/dist-packages/python_hosts/hosts.py", line 261, in
func = lambda entry: entry.comment or name not in entry.names
TypeError: argument of type 'NoneType' is not iterable
I've got below error when i was trying to remove_all_matching by using name or set the force=True in adding a host record.
Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/python_hosts/hosts.py", line 371, in add self.remove_all_matching(name=entry.names) File "/usr/local/lib/python2.7/dist-packages/python_hosts/hosts.py", line 264, in remove_all_matching self.entries = list(filter(func, self.entries)) File "/usr/local/lib/python2.7/dist-packages/python_hosts/hosts.py", line 261, in
func = lambda entry: entry.comment or name not in entry.names
TypeError: argument of type 'NoneType' is not iterable