49 self.errors = [] |
49 self.errors = [] |
50 self.counters = {} |
50 self.counters = {} |
51 |
51 |
52 interpreter = Preferences.getDebugger("PythonInterpreter") |
52 interpreter = Preferences.getDebugger("PythonInterpreter") |
53 if interpreter == "" or not Utilities.isExecutable(interpreter): |
53 if interpreter == "" or not Utilities.isExecutable(interpreter): |
54 self.errors.append((filename, 1, 1, |
54 self.errors.append( |
55 QCoreApplication.translate("CodeStyleCheckerPy2", |
55 (filename, 1, 1, |
|
56 QCoreApplication.translate( |
|
57 "CodeStyleCheckerPy2", |
56 "Python2 interpreter not configured."))) |
58 "Python2 interpreter not configured."))) |
57 return |
59 return |
58 |
60 |
59 checker = os.path.join(getConfig('ericDir'), |
61 checker = os.path.join(getConfig('ericDir'), |
60 "UtilitiesPython2", "CodeStyleChecker.py") |
62 "UtilitiesPython2", "CodeStyleChecker.py") |
121 while index < len(output): |
123 while index < len(output): |
122 code, countStr = output[index].split(None, 1) |
124 code, countStr = output[index].split(None, 1) |
123 self.counters[code] = int(countStr) |
125 self.counters[code] = int(countStr) |
124 index += 1 |
126 index += 1 |
125 else: |
127 else: |
126 self.errors.append((filename, 1, 1, |
128 self.errors.append( |
127 QCoreApplication.translate("CodeStyleCheckerPy2", |
129 (filename, 1, 1, |
|
130 QCoreApplication.translate( |
|
131 "CodeStyleCheckerPy2", |
128 "Python2 interpreter did not finish within 15s."))) |
132 "Python2 interpreter did not finish within 15s."))) |