From e4a772c61ca84619501cf0740ef70788008cf134 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 16 Jul 2018 14:44:07 +0200 Subject: [PATCH] Fix try-except-raise for pylint 2.0 See https://github.com/PyCQA/pylint/issues/2302 --- qutebrowser/browser/qutescheme.py | 2 -- qutebrowser/config/configfiles.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/qutebrowser/browser/qutescheme.py b/qutebrowser/browser/qutescheme.py index 05a708336..ee33d7897 100644 --- a/qutebrowser/browser/qutescheme.py +++ b/qutebrowser/browser/qutescheme.py @@ -187,8 +187,6 @@ def data_for_url(url): except OSError as e: # FIXME:qtwebengine how to handle this? raise QuteSchemeOSError(e) - except QuteSchemeError: - raise assert mimetype is not None, url if mimetype == 'text/html' and isinstance(data, str): diff --git a/qutebrowser/config/configfiles.py b/qutebrowser/config/configfiles.py index a2c88d311..d0830dd72 100644 --- a/qutebrowser/config/configfiles.py +++ b/qutebrowser/config/configfiles.py @@ -576,7 +576,7 @@ def read_autoconfig(): """Read the autoconfig.yml file.""" try: config.instance.read_yaml() - except configexc.ConfigFileErrors: + except configexc.ConfigFileErrors: # pylint: disable=try-except-raise raise # caught in outer block except configexc.Error as e: desc = configexc.ConfigErrorDesc("Error", e)