Fixed an issue in the syntax check dialog.

Mon, 02 Nov 2015 09:57:05 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 02 Nov 2015 09:57:05 +0100
changeset 4522
e41020d3c031
parent 4521
8742f7fa0e87
child 4524
5543f4dec8f7

Fixed an issue in the syntax check dialog.

Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py file | annotate | diff | comparison | revisions
diff -r 8742f7fa0e87 -r e41020d3c031 Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py
--- a/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py	Sun Nov 01 14:31:49 2015 +0100
+++ b/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py	Mon Nov 02 09:57:05 2015 +0100
@@ -356,7 +356,10 @@
         for _fn, lineno, col, code, msg in warnings:
             self.noResults = False
             if source:
-                scr_line = source[lineno - 1].strip()
+                try:
+                    scr_line = source[lineno - 1].strip()
+                except IndexError:
+                    scr_line = ""
             else:
                 scr_line = ""
             self.__createResultItem(_fn, lineno, col, msg, scr_line, True)

eric ide

mercurial