diff options
| author | Mustufa Rangwala <mra@tinyerp.com> | 2008-12-10 14:59:28 +0530 |
|---|---|---|
| committer | Mustufa Rangwala <mra@tinyerp.com> | 2008-12-10 14:59:28 +0530 |
| commit | e82b12c8dd08f10ee474da84d5f913cd30d14208 (patch) | |
| tree | bb2553be7d2affc376ee90dea699b3a39ef2de69 /addons/base_module_quality/wizard | |
| parent | f6759ae7b089bce8d10b8455d5157c0bf3cb8561 (diff) | |
base_module_quality
bzr revid: mra@tinyerp.com-20081210092928-9ai3opp8tcvw6r22
Diffstat (limited to 'addons/base_module_quality/wizard')
| -rw-r--r-- | addons/base_module_quality/wizard/pylint_test/pylint_test.py | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/addons/base_module_quality/wizard/pylint_test/pylint_test.py b/addons/base_module_quality/wizard/pylint_test/pylint_test.py index df4491a8f85..a640e37e96c 100644 --- a/addons/base_module_quality/wizard/pylint_test/pylint_test.py +++ b/addons/base_module_quality/wizard/pylint_test/pylint_test.py @@ -36,34 +36,16 @@ def _test_pylint(self, url, add_folder=None): subfolder.update(res) dict_files = {} for file in list_files: - if file.split('.')[-1] == 'py': - save_file = file.split('.')[0]+".txt" + if file.split('.')[-1] == 'py' and not file.startswith('__init__'): file_path = os.path.join(url, file) - os.system('pylint '+file_path+'>> '+save_file+' ') - a2 = os.system('cat '+save_file+' | tail -4 >> temp.txt') - os.system('rm '+save_file+' ') - fp = open('temp.txt','r') - result = fp.read() - fp.close() - str_result = '' - try: - for line in result: - str_result = str_result + line - finally: - fp = open('temp.txt','w') - fp.write('') - fp.close() - if str_result.startswith('Global'): + res = os.popen('pylint '+file_path+' | tail -4').read() + if res.startswith('Global'): if add_folder: - dict_files[add_folder + '/' + file] = str_result + dict_files[add_folder + '/' + file] = res else: - dict_files[file] = str_result - os.system(' rm temp.txt ') + dict_files[file] = res dict_files.update(subfolder) return dict_files -# - - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
