eric6/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py

changeset 8234
fcb6b4b96274
parent 8217
385f60c94548
child 8243
cc717c2ae956
--- a/eric6/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py	Tue Apr 13 17:49:05 2021 +0200
+++ b/eric6/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py	Tue Apr 13 18:02:59 2021 +0200
@@ -320,10 +320,7 @@
             ):
                 results.append((_fn, lineno, col, "", message, msg_args))
     except SyntaxError as err:
-        if err.text.strip():
-            msg = err.text.strip()
-        else:
-            msg = err.msg
+        msg = err.text.strip() if err.text.strip() else err.msg
         results.append((filename, err.lineno, 0, "FLAKES_ERROR", msg, []))
     
     return [{'warnings': results}]

eric ide

mercurial