module quality bug fix

bzr revid: mra@tinyerp.com-20090113114047-u7qpf3041jjl02ha
This commit is contained in:
mra (Open ERP)
2009-01-13 17:10:47 +05:30
parent 2d2e26a4e9
commit 8f6cc4e365
@@ -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("</div>")[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"