From bc8f0081056bf002311f0db8eee54367ec4b641b Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Thu, 28 Mar 2024 15:37:56 +0100 Subject: [PATCH] Do not attempt to add
if there is no HTML text Happens for trace messages. --- src/python/adgui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/adgui.py b/src/python/adgui.py index 9d704a7d..2729d9c7 100755 --- a/src/python/adgui.py +++ b/src/python/adgui.py @@ -256,7 +256,7 @@ class adgui(QObject): html = f"{s}" elif level < ad.MSG_TRACE: html = f"{s}" - if not no_nl or s[-1] == '\n': + if html and (not no_nl or s[-1] == '\n'): html += "
\n" if s != "" and s != "\n": new_bol = not no_nl or (s[-1] == '\n')