Fix "Exception ignored in:" warnings.

Fixes #245.
This commit is contained in:
Florian Bruhin 2014-11-10 18:00:44 +01:00
parent 398da22b54
commit 57212c8438

View File

@ -131,7 +131,13 @@ class WebView(QWebView):
# when quitting. # when quitting.
# Copied from: # Copied from:
# https://code.google.com/p/webscraping/source/browse/webkit.py#325 # https://code.google.com/p/webscraping/source/browse/webkit.py#325
try:
self.setPage(None) self.setPage(None)
except RuntimeError:
# It seems sometimes Qt has already deleted the QWebView and we
# get: RuntimeError: wrapped C/C++ object of type WebView has been
# deleted
pass
def _set_load_status(self, val): def _set_load_status(self, val):
"""Setter for load_status.""" """Setter for load_status."""