From 5b8e0d8d800ade0a8991beae1810a0c1f6aaee66 Mon Sep 17 00:00:00 2001 From: SubbulakshmiRS Date: Sat, 11 Aug 2018 15:53:17 +0530 Subject: [PATCH] Fixing the previous patches Patch files for correct usage of QuteSchemeError and general clean up. Closes https://github.com/qutebrowser/qutebrowser/issues/4059 --- qutebrowser/browser/webengine/webenginequtescheme.py | 2 +- qutebrowser/browser/webkit/network/webkitqutescheme.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/browser/webengine/webenginequtescheme.py b/qutebrowser/browser/webengine/webenginequtescheme.py index a4de0011c..3e39943a6 100644 --- a/qutebrowser/browser/webengine/webenginequtescheme.py +++ b/qutebrowser/browser/webengine/webenginequtescheme.py @@ -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]) diff --git a/qutebrowser/browser/webkit/network/webkitqutescheme.py b/qutebrowser/browser/webkit/network/webkitqutescheme.py index 21951b870..1c3bfff82 100644 --- a/qutebrowser/browser/webkit/network/webkitqutescheme.py +++ b/qutebrowser/browser/webkit/network/webkitqutescheme.py @@ -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])