eric6/E5Gui/E5ErrorMessage.py

changeset 8257
28146736bbfc
parent 8243
cc717c2ae956
child 8268
6b8128e0c9d1
--- a/eric6/E5Gui/E5ErrorMessage.py	Tue Apr 20 19:38:10 2021 +0200
+++ b/eric6/E5Gui/E5ErrorMessage.py	Tue Apr 20 19:47:39 2021 +0200
@@ -138,15 +138,16 @@
                 .replace("\n", "<br/>")
                 .replace("\r", "<br/>")
             )
-            if context.file is not None:
-                msg = (
+            msg = (
+                (
                     "<p><b>{0}</b></p><p>{1}</p><p>File: {2}</p>"
                     "<p>Line: {3}</p><p>Function: {4}</p>"
                 ).format(messageType, Utilities.html_uencode(message),
                          context.file, context.line, context.function)
-            else:
-                msg = "<p><b>{0}</b></p><p>{1}</p>".format(
+                if context.file is not None else
+                "<p><b>{0}</b></p><p>{1}</p>".format(
                     messageType, Utilities.html_uencode(message))
+            )
             if QThread.currentThread() == e5App().thread():
                 _msgHandlerDialog.showMessage(msg)
             else:

eric ide

mercurial