From aabee422e01b24e0bcafb0a797fd11b823a66105 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 20 Feb 2014 11:03:55 +0200 Subject: [PATCH] PEP8 fixes. --- tools/aws.py | 2 ++ tools/ci.py | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/tools/aws.py b/tools/aws.py index a6c0b774f..e5061a875 100644 --- a/tools/aws.py +++ b/tools/aws.py @@ -17,6 +17,8 @@ def wget(url): return '' # Perform a git pull. + + def gitpull(): try: subprocess.call(['git', 'pull']) diff --git a/tools/ci.py b/tools/ci.py index ee0007ab4..7c8f3bb50 100644 --- a/tools/ci.py +++ b/tools/ci.py @@ -29,7 +29,7 @@ def upload(file_to_upload, destination): password = sys.argv[1] child = pexpect.spawn( 'scp ' + file_to_upload + ' danielmarjamaki,cppcheck@web.sourceforge.net:' + destination) - #child.expect( + # child.expect( # 'danielmarjamaki,cppcheck@web.sourceforge.net\'s password:') child.expect('Password:') child.sendline(password) @@ -131,26 +131,28 @@ def daca2report(): subprocess.call(['python', 'tools/daca2-report.py', 'daca2-report']) upload('-r daca2-report', 'htdocs/devinfo/') + def daca2folder(): oldresults = glob.glob(os.path.expanduser('~/daca2/*/results.txt')) oldestfolder = None oldestdate = None for old in oldresults: - f = open(old,'rt') + f = open(old, 'rt') filedata = f.read() f.close() pos = filedata.find('STARTDATE') if pos < 0: pos = old.find('/daca2/') - return old[pos+7:old.find('/',pos+8)] - startdate = filedata[pos+10:pos+20] + return old[pos + 7:old.find('/', pos + 8)] + startdate = filedata[pos + 10:pos + 20] if not oldestdate or oldestdate > startdate: oldestdate = startdate pos = old.find('/daca2/') - oldestfolder = old[pos+7:old.find('/',pos+8)] + oldestfolder = old[pos + 7:old.find('/', pos + 8)] return oldestfolder + def daca2(): folder = daca2folder() print('Daca2 folder=' + folder) @@ -164,7 +166,7 @@ def daca2(): subprocess.call( ['make', 'clean']) subprocess.call( - ['nice', 'make', 'SRCDIR=build', 'CFGDIR='+os.path.expanduser('~/cppcheck/cfg'), 'CXXFLAGS=-O2', 'CPPFLAGS=-DMAXTIME=600']) + ['nice', 'make', 'SRCDIR=build', 'CFGDIR=' + os.path.expanduser('~/cppcheck/cfg'), 'CXXFLAGS=-O2', 'CPPFLAGS=-DMAXTIME=600']) subprocess.call( ['mv', 'cppcheck', os.path.expanduser('~/daca2/cppcheck-O2')])