You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A couple of suggested improvements for get_tracker_lists:
Raise a ValueError for invalid categories found in the configuration file, just like we do for tags.
If the categories key of a configuration section exists but is empty, get_tracker_lists passes to get_domains_from_category_filters a category_filters list that is equal to [""].
To avoid this, we could either raise a ValueError when we encounter an empty categories key in get_tracker_lists or fall back to using the DEFAULT_DISCONNECT_LIST_CATEGORIES, just like when there is no categories key.
The text was updated successfully, but these errors were encountered:
Regarding (2), after discussing it with @englehardt and @say-yawn we decided to go with raising a ValueError, not only when the categories key exists and is empty, but also when it does not exist. We will get rid of the DEFAULT_DISCONNECT_LIST_CATEGORIES, which can be confusing, and require explicitly determining the categories in every configuration section.
A couple of suggested improvements for
get_tracker_lists
:Raise a
ValueError
for invalid categories found in the configuration file, just like we do for tags.If the
categories
key of a configuration section exists but is empty,get_tracker_lists
passes toget_domains_from_category_filters
acategory_filters
list that is equal to[""]
.This results in the
DisconnectParser
raising aKeyError
whenget_domains_from_category_filters
tries to get the domains with category""
.To avoid this, we could either raise a
ValueError
when we encounter an emptycategories
key inget_tracker_lists
or fall back to using theDEFAULT_DISCONNECT_LIST_CATEGORIES
, just like when there is nocategories
key.The text was updated successfully, but these errors were encountered: