diff options
author | Florian Bruhin <me@the-compiler.org> | 2022-07-05 16:07:50 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2022-08-15 18:36:55 +0200 |
commit | a6bb26d137c4214c4995bfc7ca155d95f68cb63c (patch) | |
tree | 591edb23910df7f3b68eb944fb00f8a6530aad42 | |
parent | d5b95127dd3345be96545878269a57b6e7274c36 (diff) | |
download | qutebrowser-a6bb26d137c4214c4995bfc7ca155d95f68cb63c.tar.gz qutebrowser-a6bb26d137c4214c4995bfc7ca155d95f68cb63c.zip |
Handle OSError from adblock
When the file is e.g. unreadable, .is_file() will work, but this step will fail.
(cherry picked from commit 991cf1e8baee1a2365c1e2e81f92ce348344871c)
-rw-r--r-- | qutebrowser/components/braveadblock.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qutebrowser/components/braveadblock.py b/qutebrowser/components/braveadblock.py index b1e5b8a29..0790e2f7f 100644 --- a/qutebrowser/components/braveadblock.py +++ b/qutebrowser/components/braveadblock.py @@ -266,6 +266,8 @@ class BraveAdBlocker: except DeserializationError: message.error("Reading adblock filter data failed (corrupted data?). " "Please run :adblock-update.") + except OSError as e: + message.error(f"Reading adblock filter data failed: {e}") elif ( config.val.content.blocking.adblock.lists and not self._has_basedir |