From e6e633547352df9f282d428f4107e7c01b7d40ab Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sat, 12 Oct 2013 19:40:04 +0300 Subject: [PATCH] Revert 568a49c4092835a11255bb75d035ea13c7e692b3 and do the changes properly. --- tools/daca2.py | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/tools/daca2.py b/tools/daca2.py index 6c89ca714..b9203016c 100644 --- a/tools/daca2.py +++ b/tools/daca2.py @@ -68,21 +68,30 @@ for package in packages: subprocess.call(['tar', 'xzvf', filename]) subprocess.call(['rm', filename]) - dirname = None - for s in glob.glob(filename[:2] + '*'): - if os.path.isdir(s): - dirname = s - if dirname is None: - continue + dirname = None + for s in glob.glob(filename[:2] + '*'): + if os.path.isdir(s): + dirname = s + if dirname is None: + continue - print('cppcheck "' + dirname + '"') - p = subprocess.Popen(['nice', '../cppcheck-O2', '-j2', '-D__GCC__', '--enable=style', '--suppressions-list=../suppressions.txt', dirname], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - comm = p.communicate() + print('cppcheck "' + dirname + '"') + p = subprocess.Popen( + ['nice', + '../cppcheck-O2', + '-j2', + '-D__GCC__', + '--enable=style', + '--suppressions-list=../suppressions.txt', + dirname], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + comm = p.communicate() - results = open('results.txt', 'at') - results.write(fullpath + '\n') - results.write(comm[1] + '\n') - results.close() + results = open('results.txt', 'at') + results.write(fullpath + '\n') + results.write(comm[1] + '\n') + results.close() - # remove all files/folders except results.txt - removeAllExceptResults() + # remove all files/folders except results.txt + removeAllExceptResults()