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.
# Copied from:
# https://code.google.com/p/webscraping/source/browse/webkit.py#325
self.setPage(None)
try:
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):
"""Setter for load_status."""