Donate CPU: minor tweaks in client
This commit is contained in:
parent
8459380a79
commit
40364561e3
|
@ -67,12 +67,12 @@ def wget(url, destfile):
|
||||||
def scanPackage(workPath, package):
|
def scanPackage(workPath, package):
|
||||||
print('Download package ' + package)
|
print('Download package ' + package)
|
||||||
destfile = workPath + '/temp.tgz'
|
destfile = workPath + '/temp.tgz'
|
||||||
|
tempPath = workPath + '/temp'
|
||||||
|
subprocess.call(['rm', '-rf', tempPath, destfile])
|
||||||
if not wget(package, destfile):
|
if not wget(package, destfile):
|
||||||
if not wget(filepath, destfile):
|
if not wget(filepath, destfile):
|
||||||
return None
|
return None
|
||||||
print('Unpacking..')
|
print('Unpacking..')
|
||||||
tempPath = workPath + '/temp'
|
|
||||||
subprocess.call(['rm', '-rf', tempPath])
|
|
||||||
os.mkdir(tempPath)
|
os.mkdir(tempPath)
|
||||||
os.chdir(tempPath)
|
os.chdir(tempPath)
|
||||||
subprocess.call(['tar', 'xzvf', destfile])
|
subprocess.call(['tar', 'xzvf', destfile])
|
||||||
|
@ -110,4 +110,3 @@ while True:
|
||||||
results = scanPackage(workpath, package)
|
results = scanPackage(workpath, package)
|
||||||
if results:
|
if results:
|
||||||
uploadResults(package, results)
|
uploadResults(package, results)
|
||||||
break
|
|
||||||
|
|
Loading…
Reference in New Issue