summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/changelog.asciidoc4
-rw-r--r--qutebrowser/components/braveadblock.py8
2 files changed, 10 insertions, 2 deletions
diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc
index de818d4b9..a70124af9 100644
--- a/doc/changelog.asciidoc
+++ b/doc/changelog.asciidoc
@@ -30,6 +30,10 @@ Fixed
file is not part of the release anymore, but if an old version is still around,
causes qutebrowser to crash. It's now explicitly blocked inside qutebrowser so
it gets ignored even if it still exists.
+- When the adblocking method was switched using `:set`, and the `adblock`
+ dependency was unavailable when qutebrowser started (but was installed while
+ qutebrowser was open), this resulted in a crash. Now a warning prompting for a
+ restart of qutebrowser is shown instead.
Changed
~~~~~~~
diff --git a/qutebrowser/components/braveadblock.py b/qutebrowser/components/braveadblock.py
index 68196255c..a851ff513 100644
--- a/qutebrowser/components/braveadblock.py
+++ b/qutebrowser/components/braveadblock.py
@@ -74,12 +74,16 @@ def _possibly_show_missing_dependency_warning() -> None:
f"Installed version {adblock_info.get_version()} of the 'adblock' "
f"dependency is too old. Minimum supported is {adblock_info.min_version}."
)
- else:
- assert not adblock_info.is_installed(), adblock_info
+ elif not adblock_info.is_installed():
message.warning(
f"Ad blocking method is set to '{method}' but 'adblock' dependency is not "
"installed."
)
+ else:
+ message.warning(
+ "The 'adblock' dependency was unavailable when qutebrowser was started, "
+ "but now seems to be installed. Please :restart qutebrowser to use it."
+ )
_RESOURCE_TYPE_STRINGS = {