summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-07-13 18:12:22 +0200
committerFlorian Bruhin <me@the-compiler.org>2021-07-28 13:24:18 +0200
commitc36970521fe5ec84f8bdef6cfd0a8bf89bb4fabb (patch)
treef0e5974d41ad6af268b3f36960d709c25c169b1d
parentcb478162e5b3057eb3f0661adb6b2a0ee080f6ee (diff)
downloadqutebrowser-c36970521fe5ec84f8bdef6cfd0a8bf89bb4fabb.tar.gz
qutebrowser-c36970521fe5ec84f8bdef6cfd0a8bf89bb4fabb.zip
Simplify exception catching
(cherry picked from commit 52d551875dba74b63b322a07baa4aeac4da865eb)
-rw-r--r--qutebrowser/completion/models/filepathcategory.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/qutebrowser/completion/models/filepathcategory.py b/qutebrowser/completion/models/filepathcategory.py
index db2733b4f..b7d74f57a 100644
--- a/qutebrowser/completion/models/filepathcategory.py
+++ b/qutebrowser/completion/models/filepathcategory.py
@@ -93,7 +93,7 @@ class FilePathCategory(QAbstractListModel):
else:
try:
expanded = os.path.expanduser(val)
- except (UnicodeEncodeError, ValueError):
+ except ValueError:
# os.path.expanduser('~\ud800') can raise UnicodeEncodeError
# via pwd.getpwnam. '~\x00' can raise ValueError.
expanded = val