src/eric7/Plugins/CheckerPlugins/SyntaxChecker/tomlCheckSyntax.py

branch
eric7
changeset 9467
1798115ba35c
parent 9292
a5c8a0213fe3
child 9473
3f23dbf37dbe
--- a/src/eric7/Plugins/CheckerPlugins/SyntaxChecker/tomlCheckSyntax.py	Thu Nov 03 17:51:34 2022 +0100
+++ b/src/eric7/Plugins/CheckerPlugins/SyntaxChecker/tomlCheckSyntax.py	Fri Nov 04 11:18:07 2022 +0100
@@ -176,7 +176,7 @@
     """
     try:
         import tomlkit
-        from tomlkit.exceptions import ParseError
+        from tomlkit.exceptions import ParseError, KeyAlreadyPresent
     except ImportError:
         error = "tomlkit not available. Install it via the PyPI interface."
         return [{"error": (file, 0, 0, "", error)}]
@@ -195,5 +195,7 @@
         code = codestring.splitlines()[cline]
 
         return [{"error": (file, line, column, code, error)}]
+    except KeyAlreadyPresent as exc:
+        return [{"error": (file, 0, 0, "", str(exc))}]
 
     return [{}]

eric ide

mercurial