From 4f3a2fab213cc8dff175f3d1e73a084b260ab01a Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 10 Jul 2020 18:25:03 +0200 Subject: [benchmark.py] fix load for paths to save files or save directories --- allocbench/benchmark.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/allocbench/benchmark.py b/allocbench/benchmark.py index a630cf5..1d75d67 100644 --- a/allocbench/benchmark.py +++ b/allocbench/benchmark.py @@ -264,10 +264,11 @@ class Benchmark: def load(self, path=None): """Load benchmark results from file""" - if not path: + filename = path + if not filename: filename = f"{self.name}.json" elif os.path.isdir(path): - filename = os.path.join(path, self.name) + filename = os.path.join(path, f"{self.name}.json") if os.path.exists(filename): with open(filename, "r") as load_file: -- cgit v1.2.3