Donate CPU: minor tweaks in client

This commit is contained in:
Daniel Marjamäki 2018-08-23 21:47:34 +02:00
parent 8459380a79
commit 40364561e3
1 changed files with 2 additions and 3 deletions

View File

@ -67,12 +67,12 @@ def wget(url, destfile):
def scanPackage(workPath, package):
print('Download package ' + package)
destfile = workPath + '/temp.tgz'
tempPath = workPath + '/temp'
subprocess.call(['rm', '-rf', tempPath, destfile])
if not wget(package, destfile):
if not wget(filepath, destfile):
return None
print('Unpacking..')
tempPath = workPath + '/temp'
subprocess.call(['rm', '-rf', tempPath])
os.mkdir(tempPath)
os.chdir(tempPath)
subprocess.call(['tar', 'xzvf', destfile])
@ -110,4 +110,3 @@ while True:
results = scanPackage(workpath, package)
if results:
uploadResults(package, results)
break