diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-12-22 16:55:51 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-12-22 18:19:42 +0100 |
commit | 478f0e8f88258fd1d0258177cf45a72e04c44788 (patch) | |
tree | 460847508af91a5efaed923d5f6f8c81ebdad0b6 /qutebrowser/components | |
parent | 3235e6f1109414a4859b903e250f7053f87614d3 (diff) | |
download | qutebrowser-478f0e8f88258fd1d0258177cf45a72e04c44788.tar.gz qutebrowser-478f0e8f88258fd1d0258177cf45a72e04c44788.zip |
Add ModuleInfo.is_usable()
Diffstat (limited to 'qutebrowser/components')
-rw-r--r-- | qutebrowser/components/adblock.py | 2 | ||||
-rw-r--r-- | qutebrowser/components/braveadblock.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/qutebrowser/components/adblock.py b/qutebrowser/components/adblock.py index 1df9ad99e..e1ef88667 100644 --- a/qutebrowser/components/adblock.py +++ b/qutebrowser/components/adblock.py @@ -74,7 +74,7 @@ def _should_be_used() -> bool: method = config.val.content.blocking.method adblock_info = version.MODULE_INFO["adblock"] - adblock_usable = adblock_info.is_installed() and not adblock_info.is_outdated() + adblock_usable = adblock_info.is_usable() logger.debug(f"Configured adblock method {method}, adblock library usable: " f"{adblock_usable}") diff --git a/qutebrowser/components/braveadblock.py b/qutebrowser/components/braveadblock.py index 845f2f31b..5a6cf1152 100644 --- a/qutebrowser/components/braveadblock.py +++ b/qutebrowser/components/braveadblock.py @@ -281,7 +281,7 @@ def init(context: apitypes.InitContext) -> None: global ad_blocker adblock_info = version.MODULE_INFO["adblock"] - if not adblock_info.is_installed() or adblock_info.is_outdated(): + if not adblock_info.is_usable(): # We want 'adblock' to be an optional dependency. If the module is # not installed or is outdated, we simply keep the `ad_blocker` global at # `None`. |