PEP8 fixes.

This commit is contained in:
XhmikosR 2014-02-20 11:03:55 +02:00
parent 94454df14f
commit aabee422e0
2 changed files with 10 additions and 6 deletions

View File

@ -17,6 +17,8 @@ def wget(url):
return ''
# Perform a git pull.
def gitpull():
try:
subprocess.call(['git', 'pull'])

View File

@ -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')])