This commit is contained in:
Florian Bruhin 2014-06-23 08:26:35 +02:00
parent be68f98ce7
commit 6774445497
2 changed files with 4 additions and 4 deletions

View File

@ -120,9 +120,9 @@ class _CrashDialog(QDialog):
try:
self._crash_info.append(("Contact info",
"User: {}".format(getuser())))
except Exception as e:
except Exception as e: # pylint: disable=broad-except
self._crash_info.append(("Contact info", "User: {}: {}".format(
e.__class__.__name__, e)))
e.__class__.__name__, e)))
self._crash_info.append(("Version info", version()))
try:
self._crash_info.append(("Config",

View File

@ -186,7 +186,7 @@ class WebView(QWebView):
hitresult: A QWebHitTestResult
"""
# Beginnings of div-classes which are actually some kind of editor.
DIV_CLASSES = ['CodeMirror', # Javascript editor over a textarea
div_classes = ['CodeMirror', # Javascript editor over a textarea
'kix-'] # Google Docs editor
elem = hitresult.element()
tag = elem.tagName().lower()
@ -213,7 +213,7 @@ class WebView(QWebView):
log.webview.debug("div with classes {} clicked!".format(
elem.classes()))
for klass in elem.classes():
if any([klass.startswith(e) for e in DIV_CLASSES]):
if any([klass.startswith(e) for e in div_classes]):
return True
elif tag == 'span':
log.webview.debug("span with classes {} clicked!".format(