Mon, 02 Nov 2015 10:05:31 +0100
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)