From f748866e9eb62900485100714bff42647a366af5 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 13 Nov 2019 13:30:30 +0100 Subject: remove left over status file at exit If writing the status file fails because of not sufficient space left successive runs can fail because of a broken status file. --- bench.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bench.py b/bench.py index 10c8f25..696c66a 100755 --- a/bench.py +++ b/bench.py @@ -52,6 +52,10 @@ def epilog(): with open(os.path.join(src.globalvars.resdir, "facts.save"), "wb") as facts_file: pickle.dump(src.globalvars.facts, facts_file) + # remove a left over status file if some is present + if os.path.exists("status"): + os.remove("status") + def check_dependencies(): """Check if known requirements of allocbench are met""" -- cgit v1.2.3