diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-07-10 18:25:03 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-07-10 18:25:03 +0200 |
| commit | 4f3a2fab213cc8dff175f3d1e73a084b260ab01a (patch) | |
| tree | 8422280340eebd9c102802b817e6952ed5cbbcb3 | |
| parent | f03f91596267d96b3d16973d04f7f9426fd6fbe6 (diff) | |
| download | allocbench-4f3a2fab213cc8dff175f3d1e73a084b260ab01a.tar.gz allocbench-4f3a2fab213cc8dff175f3d1e73a084b260ab01a.zip | |
[benchmark.py] fix load for paths to save files or save directories
| -rw-r--r-- | allocbench/benchmark.py | 5 |
1 files 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: |
