diff --git a/addons/base_module_quality/pyflakes_test/pyflakes_test.py b/addons/base_module_quality/pyflakes_test/pyflakes_test.py
index 4968bb6e6cc..635d4364dcb 100644
--- a/addons/base_module_quality/pyflakes_test/pyflakes_test.py
+++ b/addons/base_module_quality/pyflakes_test/pyflakes_test.py
@@ -56,7 +56,15 @@ class quality_test(base_module_quality.abstract_quality_check):
flag = True
file_path = os.path.join(module_path, file_py)
try:
- res = os.popen('pyflakes' + ' ' + file_path).read()
+ try:
+ import pyflakes
+ res = os.popen('pyflakes' + ' ' + file_path).read()
+ except:
+ self.error = True
+ import netsvc
+ netsvc.Logger().notifyChannel('Pyflakes', netsvc.LOG_WARNING, "Is pyflakes correctly installed? (http://pypi.python.org/pypi/pyflakes/0.3.0)")
+ self.result += _("Error! Is pyflakes correctly installed? (http://pypi.python.org/pypi/pyflakes/0.3.0)")+"\n"
+ return None
if not res:
continue
self.result_details += '''
| ''' + file_py + ' | '
@@ -95,8 +103,9 @@ class quality_test(base_module_quality.abstract_quality_check):
if str(temp_dict[t]) != '0':
final_str += '\n' + str(t) + ' : ' + str(temp_dict[t]) + '\n'
except:
- self.result += _("Error! Is pyflakes correctly installed? (http://pypi.python.org/pypi/pyflakes/0.3.0)")+"\n"
- break
+ self.error = True
+ self.result += _("Error in running pyflakes") + "\n"
+ return None
try:
dict_py[file_py] = [file_py, final_str]
except:
diff --git a/addons/base_module_quality/pylint_test/pylint_test.py b/addons/base_module_quality/pylint_test/pylint_test.py
index fdc5d16657b..7cabf4a19d8 100644
--- a/addons/base_module_quality/pylint_test/pylint_test.py
+++ b/addons/base_module_quality/pylint_test/pylint_test.py
@@ -58,10 +58,14 @@ class quality_test(base_module_quality.abstract_quality_check):
flag = True
file_path = os.path.join(module_path, file_py)
try:
+ import pylint
res = os.popen('pylint --rcfile=' + config_file_path + ' ' + file_path).read()
except:
- self.result += _("Error. Is pylint correctly installed?")+"\n"
- break
+ self.error = True
+ import netsvc
+ netsvc.Logger().notifyChannel('Pylint:', netsvc.LOG_WARNING, "Is pylint correctly installed? (http://pypi.python.org/pypi/pylint)")
+ self.result += _("Error. Is pylint correctly installed? (http://pypi.python.org/pypi/pylint)")+"\n"
+ return None
count += 1
# leftchar = -1
# while res[leftchar:leftchar+1] != ' ' and leftchar-1 <= 0:
|