56 self.errors = [] |
56 self.errors = [] |
57 self.counters = {} |
57 self.counters = {} |
58 |
58 |
59 interpreter = Preferences.getDebugger("PythonInterpreter") |
59 interpreter = Preferences.getDebugger("PythonInterpreter") |
60 if interpreter == "" or not Utilities.isExecutable(interpreter): |
60 if interpreter == "" or not Utilities.isExecutable(interpreter): |
61 self.errors.append((filename, 1, 1, |
61 self.errors.append( |
62 QCoreApplication.translate("CodeStyleCheckerPy2", |
62 (filename, 1, 1, |
|
63 QCoreApplication.translate( |
|
64 "CodeStyleCheckerPy2", |
63 "Python2 interpreter not configured."))) |
65 "Python2 interpreter not configured."))) |
64 return |
66 return |
65 |
67 |
66 checker = os.path.join(getConfig('ericDir'), |
68 checker = os.path.join(getConfig('ericDir'), |
67 "UtilitiesPython2", "CodeStyleChecker.py") |
69 "UtilitiesPython2", "CodeStyleChecker.py") |
128 while index < len(output): |
130 while index < len(output): |
129 code, countStr = output[index].split(None, 1) |
131 code, countStr = output[index].split(None, 1) |
130 self.counters[code] = int(countStr) |
132 self.counters[code] = int(countStr) |
131 index += 1 |
133 index += 1 |
132 else: |
134 else: |
133 self.errors.append((filename, 1, 1, |
135 self.errors.append( |
134 QCoreApplication.translate("CodeStyleCheckerPy2", |
136 (filename, 1, 1, |
|
137 QCoreApplication.translate( |
|
138 "CodeStyleCheckerPy2", |
135 "Python2 interpreter did not finish within 15s."))) |
139 "Python2 interpreter did not finish within 15s."))) |