diff -r f0d60c3de700 -r 5ed91fe54bc9 WebBrowser/Download/DownloadManager.py --- a/WebBrowser/Download/DownloadManager.py Thu Jan 25 17:47:09 2018 +0100 +++ b/WebBrowser/Download/DownloadManager.py Thu Jan 25 18:50:49 2018 +0100 @@ -173,23 +173,26 @@ return # Safe Browsing - threatLists = WebBrowserWindow.safeBrowsingManager().lookupUrl(url) - if threatLists: - threatMessages = WebBrowserWindow.safeBrowsingManager()\ - .getThreatMessages(threatLists) - res = E5MessageBox.warning( - WebBrowserWindow.getWindow(), - self.tr("Suspicuous URL detected"), - self.tr("<p>The URL <b>{0}</b> was found in the Safe Browsing" - " database.</p>{1}").format(url.toString(), - "".join(threatMessages)), - E5MessageBox.StandardButtons( - E5MessageBox.Abort | - E5MessageBox.Ignore), - E5MessageBox.Abort) - if res == E5MessageBox.Abort: - downloadItem.cancel() - return + from WebBrowser.SafeBrowsing.SafeBrowsingManager import \ + SafeBrowsingManager + if SafeBrowsingManager.isEnabled(): + threatLists = WebBrowserWindow.safeBrowsingManager().lookupUrl(url) + if threatLists: + threatMessages = WebBrowserWindow.safeBrowsingManager()\ + .getThreatMessages(threatLists) + res = E5MessageBox.warning( + WebBrowserWindow.getWindow(), + self.tr("Suspicuous URL detected"), + self.tr("<p>The URL <b>{0}</b> was found in the Safe" + " Browsing database.</p>{1}").format( + url.toString(), "".join(threatMessages)), + E5MessageBox.StandardButtons( + E5MessageBox.Abort | + E5MessageBox.Ignore), + E5MessageBox.Abort) + if res == E5MessageBox.Abort: + downloadItem.cancel() + return from .DownloadItem import DownloadItem itm = DownloadItem(downloadItem, parent=self)