summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-12-22 16:51:31 +0100
committerFlorian Bruhin <me@the-compiler.org>2020-12-22 18:19:42 +0100
commit3235e6f1109414a4859b903e250f7053f87614d3 (patch)
tree30fa41f3294206ea0eb6ddd4b32182372eb5bf87
parent4d1349db18fb0590f6c86cfc41203c85d3ac9e7e (diff)
downloadqutebrowser-3235e6f1109414a4859b903e250f7053f87614d3.tar.gz
qutebrowser-3235e6f1109414a4859b903e250f7053f87614d3.zip
adblock: Minor changes to braveadblock.py
-rw-r--r--qutebrowser/components/braveadblock.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/qutebrowser/components/braveadblock.py b/qutebrowser/components/braveadblock.py
index b9c141663..845f2f31b 100644
--- a/qutebrowser/components/braveadblock.py
+++ b/qutebrowser/components/braveadblock.py
@@ -37,7 +37,7 @@ from qutebrowser.api import (
)
from qutebrowser.api.interceptor import ResourceType
from qutebrowser.components.utils import blockutils
-from qutebrowser.utils import version
+from qutebrowser.utils import version # FIXME: Move needed parts into api namespace?
try:
import adblock
@@ -75,6 +75,7 @@ def _possibly_show_missing_dependency_warning() -> None:
f"dependency is too old. Minimum supported is {adblock_info.min_version}."
)
else:
+ assert not adblock_info.is_installed(), adblock_info
message.warning(
f"Ad blocking method is set to '{method}' but 'adblock' dependency is not "
"installed."
@@ -282,9 +283,8 @@ def init(context: apitypes.InitContext) -> None:
adblock_info = version.MODULE_INFO["adblock"]
if not adblock_info.is_installed() or adblock_info.is_outdated():
# We want 'adblock' to be an optional dependency. If the module is
- # not installed or is outdated, we simply set the `ad_blocker` global to
+ # not installed or is outdated, we simply keep the `ad_blocker` global at
# `None`.
- ad_blocker = None
_possibly_show_missing_dependency_warning()
return