donate-cpu-server: try to handle uploaded crash results better

This commit is contained in:
Daniel Marjamäki 2018-11-19 10:57:04 +01:00
parent f5c2abaefa
commit 347c46491a
1 changed files with 18 additions and 11 deletions

View File

@ -462,7 +462,14 @@ def server(server_address_port, packages, packageIndex, resultPath):
# save data
res = re.match(r'ftp://.*pool/main/[^/]+/([^/]+)/[^/]*tar.gz',url)
if res and url in packages:
if res is None:
print('results not written. res is None.')
continue
if url not in packages:
url2 = url + '\n'
if url2 not in packages:
print('results not written. url is not in packages.')
continue
print('results added for package ' + res.group(1))
filename = resultPath + '/' + res.group(1)
with open(filename, 'wt') as f: