-
-
Notifications
You must be signed in to change notification settings - Fork 963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix a bug on remove_block_titles() and remove_block_url() #969
Conversation
Fix the exception `AttributeError: 'Filter' object has no attribute 'block_url'` introduced in this commit [1]. `self.block_title` and `self.block_url` were members of the Filter object[2], but not anymore after commit [1]. This bug can be reproduced with setting WHOOGLE_CONFIG_BLOCK_URL to a non-empty string. [1] benbusby@10a15e0 [2] benbusby@284a810
@benbusby please kindly take a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing. I can't say I'm surprised that nobody has noticed until now though -- I was already under the impression that this feature wasn't used by very many people.
Regarding adding it to the README, I'm a bit unsure since it might be better to just remove the feature altogether in a future release. Both of these configuration values require the user to input a regex to make them work, which I don't think is very user friendly. Also there's already support for blocking multiple websites using a comma separated list, which is a lot easier than writing a regex, especially for non-technical users.
Either way, if you want to add documentation for these to the README, feel free to open another PR. But I guess I'm leaning more towards just removing this functionality in the near future unless there's a compelling reason to keep it.
* add `WHOOGLE_CONFIG_BLOCK_TITLE` and `WHOOGLE_CONFIG_BLOCK_URL` * this feature was originally added in 284a810 but remained undocumented. Ref: conversations in benbusby#969
Sounds good, I've opened #971 to update the README. Perhaps this feature was low usage due to the fact it was undocumented? I'm aware the
|
Not a bug really -- in this case the regex can just be the |
I see, thanks for the clarification! |
* add `WHOOGLE_CONFIG_BLOCK_TITLE` and `WHOOGLE_CONFIG_BLOCK_URL` * this feature was originally added in 284a8102c85bdc69674952bc30a6cfacfb8b01ee but remained undocumented. Ref: conversations in benbusby/whoogle-search#969
Fix the exception
AttributeError: 'Filter' object has no attribute 'block_url'
introduced in this commit [1].self.block_title
andself.block_url
were members of the Filter object[2], but not anymore after commit [1].This bug can be reproduced with setting
WHOOGLE_CONFIG_BLOCK_URL
to a non-empty string.[1] 10a15e0
[2] 284a810