From 23e7b3f551f1e0c024658aaf3a279c67950ae15c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 8 Nov 2016 11:37:47 +0100 Subject: [PATCH] Elide js element debug string --- qutebrowser/browser/webengine/webenginetab.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py index 8d1a1ac1c..8650774c4 100644 --- a/qutebrowser/browser/webengine/webenginetab.py +++ b/qutebrowser/browser/webengine/webenginetab.py @@ -402,7 +402,10 @@ class WebEngineElements(browsertab.AbstractElements): Called with a WebEngineElement or None. js_elem: The element serialized from javascript. """ - log.webview.debug("Got element from JS: {!r}".format(js_elem)) + debug_str = ('None' if js_elem is None + else utils.elide(repr(js_elem), 100)) + log.webview.debug("Got element from JS: {}".format(debug_str)) + if js_elem is None: callback(None) else: