aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-11-13 13:30:30 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-11-13 13:30:30 +0100
commitf748866e9eb62900485100714bff42647a366af5 (patch)
tree913fdc9f08e89b07f1fd23837811f674f7f9ee7b
parent639c7ca5885b8f47d252754694534685acaaaefb (diff)
downloadallocbench-f748866e9eb62900485100714bff42647a366af5.tar.gz
allocbench-f748866e9eb62900485100714bff42647a366af5.zip
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.
-rwxr-xr-xbench.py4
1 files changed, 4 insertions, 0 deletions
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"""