diff --git a/web/run.py b/web/run.py index e5879d8..aaaccd6 100755 --- a/web/run.py +++ b/web/run.py @@ -3,7 +3,7 @@ import datetime import StringIO from math import sqrt -from os import listdir, environ +from os import listdir, environ, remove as removefile from os.path import isfile, join, abspath, dirname import csv @@ -351,6 +351,8 @@ def generate_csv_file_if_needed(target_config, started_at, stopped_at): stopped_at=stopped_at)) log.info("Generation of '%s' done." % filename) except Exception as e: + if isfile(local_csv_file): + removefile(local_csv_file) abort(500, "Failed creating CSV '%s' : %s" % (filename, e)) -- libgit2 0.21.2