Fix lint
This commit is contained in:
parent
be68f98ce7
commit
6774445497
@ -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",
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user