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-13 18:12:22 +0200
commit52d551875dba74b63b322a07baa4aeac4da865eb (patch)
tree879d36ca99e04c50a7c2d537b184c38dd4ba219e
parent676c9db2fe9833e52b12f723c3ed62a38759f82d (diff)
downloadqutebrowser-52d551875dba74b63b322a07baa4aeac4da865eb.tar.gz
qutebrowser-52d551875dba74b63b322a07baa4aeac4da865eb.zip
Simplify exception catching
-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