diff -r 0c976706e8c1 -r bace7fb85a01 WebBrowser/Network/NetworkManager.py --- a/WebBrowser/Network/NetworkManager.py Sun Feb 04 10:56:30 2018 +0100 +++ b/WebBrowser/Network/NetworkManager.py Fri Mar 02 19:35:16 2018 +0100 @@ -15,7 +15,6 @@ from PyQt5.QtWidgets import qApp, QStyle, QDialog from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkProxy, \ QNetworkProxyFactory, QNetworkRequest -from PyQt5.QtWebEngineWidgets import QWebEnginePage from E5Gui import E5MessageBox @@ -210,12 +209,16 @@ else: return False - def authentication(self, url, auth): + def authentication(self, url, auth, page=None): """ Public slot to handle an authentication request. - @param url URL requesting authentication (QUrl) - @param auth reference to the authenticator object (QAuthenticator) + @param url URL requesting authentication + @type QUrl + @param auth reference to the authenticator object + @type QAuthenticator + @param page reference to the web page + @type QWebEnginePage or None """ urlRoot = "{0}://{1}"\ .format(url.scheme(), url.authority()) @@ -249,8 +252,7 @@ WebBrowser.WebBrowserWindow.WebBrowserWindow.passwordManager()\ .setLogin(url, realm, username, password) else: - page = self.sender() - if isinstance(page, QWebEnginePage): + if page is not None: self.__showAuthenticationErrorPage(page, url) def __showAuthenticationErrorPage(self, page, url):