From 8f6cc4e3653d7f4b6291e0547a0251e5fd2a144b Mon Sep 17 00:00:00 2001 From: "mra (Open ERP)" Date: Tue, 13 Jan 2009 17:10:47 +0530 Subject: [PATCH] module quality bug fix bzr revid: mra@tinyerp.com-20090113114047-u7qpf3041jjl02ha --- .../pylint_test/pylint_test.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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"