Fix lint
This commit is contained in:
parent
c128aba27e
commit
5501d90268
@ -97,6 +97,7 @@ class add_handler: # pylint: disable=invalid-name
|
||||
return self._function(*args, **kwargs)
|
||||
|
||||
def wrong_backend_handler(self, url):
|
||||
"""Show an error page about using the invalid backend."""
|
||||
html = jinja.render('error.html',
|
||||
title="Error while opening qute:url",
|
||||
url=url.toDisplayString(),
|
||||
|
@ -29,12 +29,14 @@ from qutebrowser.utils import log
|
||||
|
||||
class QuteSchemeHandler(QWebEngineUrlSchemeHandler):
|
||||
|
||||
"""Handle qute:* requests on QtWebEngine."""
|
||||
|
||||
def install(self, profile):
|
||||
"""Install the handler for qute: URLs on the given profile."""
|
||||
profile.installUrlSchemeHandler(b'qute', self)
|
||||
|
||||
def requestStarted(self, job):
|
||||
"""This method is called when a request for the scheme is started.
|
||||
"""Handle a request for a qute: scheme.
|
||||
|
||||
This method must be reimplemented by all custom URL scheme handlers. The
|
||||
request is asynchronous and does not need to be handled right away.
|
||||
|
@ -54,7 +54,7 @@ class QuteSchemeHandler(schemehandler.SchemeHandler):
|
||||
return networkreply.ErrorNetworkReply(
|
||||
request, errorstr, QNetworkReply.ContentNotFoundError,
|
||||
self.parent())
|
||||
except qutescheme.QuteSchemeOSError:
|
||||
except qutescheme.QuteSchemeOSError as e:
|
||||
return networkreply.ErrorNetworkReply(
|
||||
request, str(e), QNetworkReply.ContentNotFoundError,
|
||||
self.parent())
|
||||
|
Loading…
Reference in New Issue
Block a user