Remove now-deprecated params + more defensive

This commit is contained in:
Helena Rasche
2019-04-26 13:20:37 +02:00
parent dcfff4d5de
commit cb7b26e25e
+8 -4
View File
@@ -292,11 +292,15 @@ def main(argv):
# Now on to outputs.
with tarfile.open(REPORT_BASE + '.tar.gz', 'w:gz') as handle:
for name in ('jobs', 'metric_num', 'params', 'datasets'):
handle.add(REPORT_BASE + '.' + name + '.tsv')
for name in ('jobs', 'metric_num', 'datasets'):
path = REPORT_BASE + '.' + name + '.tsv'
if os.path.exists(path):
handle.add(path)
for name in ('jobs', 'metric_num', 'params', 'datasets'):
os.unlink(REPORT_BASE + '.' + name + '.tsv')
for name in ('jobs', 'metric_num', 'datasets'):
path = REPORT_BASE + '.' + name + '.tsv'
if os.path.exists(path):
os.unlink(REPORT_BASE + '.' + name + '.tsv')
_times.append(('job_finish', time.time() - _start_time))
sha = hash_util.memory_bound_hexdigest(hash_util.sha256, REPORT_BASE + ".tar.gz")