Fixed an issue in the syntax check dialog. 6_0_x

Mon, 02 Nov 2015 10:05:31 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 02 Nov 2015 10:05:31 +0100
branch
6_0_x
changeset 4523
0821211a1db1
parent 4520
2e6fbd9f9fac
child 4530
fbb65197d159

Fixed an issue in the syntax check dialog.

Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py file | annotate | diff | comparison | revisions
--- a/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py	Sat Oct 31 16:49:21 2015 +0100
+++ b/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py	Mon Nov 02 10:05:31 2015 +0100
@@ -241,10 +241,13 @@
         warnings = problems.get('warnings', [])
         if warnings:
             source = self.source.splitlines()
-        for _fn, lineno, col, code, msg in warnings:
-            self.noResults = False
-            scr_line = source[lineno - 1].strip()
-            self.__createResultItem(_fn, lineno, col, msg, scr_line, True)
+            for _fn, lineno, col, code, msg in warnings:
+                self.noResults = False
+                try:
+                    scr_line = source[lineno - 1].strip()
+                except IndexError:
+                    scr_line = ""
+                self.__createResultItem(_fn, lineno, col, msg, scr_line, True)
 
         self.progress += 1
         self.checkProgress.setValue(self.progress)

eric ide

mercurial