Fixing the previous patches

Patch files for correct usage of QuteSchemeError and general clean up.

Closes https://github.com/qutebrowser/qutebrowser/issues/4059
This commit is contained in:
SubbulakshmiRS 2018-08-11 15:53:17 +05:30 committed by Florian Bruhin
parent 58793d95d7
commit 5b8e0d8d80
2 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ class QuteSchemeHandler(QWebEngineUrlSchemeHandler):
qutescheme.Error:
QWebEngineUrlRequestJob.RequestFailed,
}
exctype = e.__type__
exctype = type(e)
log.misc.exception("{} while handling qute://* URL".format(
exctype.__name__))
job.fail(errors[exctype])

View File

@ -72,7 +72,7 @@ def handler(request, operation, current_url):
qutescheme.Error:
QNetworkReply.InternalServerError,
}
exctype = e.__type__
exctype = type(e)
log.misc.exception("{} while handling qute://* URL".format(
exctype.__name__))
return networkreply.ErrorNetworkReply(request, str(e), errors[exctype])