diff --git a/addons/base_module_quality/pylint_test/pylint_test.py b/addons/base_module_quality/pylint_test/pylint_test.py index 04eef3fa7e1..f4cbe89e3a6 100644 --- a/addons/base_module_quality/pylint_test/pylint_test.py +++ b/addons/base_module_quality/pylint_test/pylint_test.py @@ -66,16 +66,18 @@ class quality_test(base_module_quality.abstract_quality_check): self.result += _("Error. Is pylint correctly installed?")+"\n" break n += 1 - leftchar = -1 - while res[leftchar:leftchar+1] != ' ' and leftchar-1 <= 0: - leftchar -= 1 - rightchar = -10 - while res[rightchar:rightchar+1] != '/' and rightchar+1 <= 0: - rightchar += 1 +# leftchar = -1 +# while res[leftchar:leftchar+1] != ' ' and leftchar-1 <= 0: +# leftchar -= 1 +# rightchar = -10 +# while res[rightchar:rightchar+1] != '/' and rightchar+1 <= 0: +# rightchar += 1 try: - score += float(res[leftchar+1:rightchar]) +# score += float(res[leftchar+1:rightchar]) + scr = res.split("Your code has been rated at")[1].split("")[0].split("/")[0] + score += float(scr) #self.result += file + ": " + res[leftchar+1:rightchar] + "/10\n" - dict[file] = [file, res[leftchar+1:rightchar]] + dict[file] = [file, scr] except: score += 0 #self.result += file + ": "+_("Unable to parse the result. Check the details.")+"\n"