diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-11-23 01:58:18 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-11-23 01:58:18 +0100 |
| commit | 3bddc491d6c1c135ee937d1ba884f7cef4e4860c (patch) | |
| tree | e0e5891c0bb4aa5e3dfd83e127fa455697933788 /src/benchmark.py | |
| parent | 00f74bd822dda4b39ed439f53e0767283f85c5e5 (diff) | |
| download | allocbench-3bddc491d6c1c135ee937d1ba884f7cef4e4860c.tar.gz allocbench-3bddc491d6c1c135ee937d1ba884f7cef4e4860c.zip | |
fix Benchmark and facter load functions
Diffstat (limited to 'src/benchmark.py')
| -rw-r--r-- | src/benchmark.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/benchmark.py b/src/benchmark.py index e1b598f..fc42763 100644 --- a/src/benchmark.py +++ b/src/benchmark.py @@ -193,12 +193,12 @@ class Benchmark: if os.path.exists(filename + ".json"): import json filename += ".json" - with open(filename, "w") as f: + with open(filename, "r") as f: self.results = json.load(f) - if os.path.exists(filename + ".save"): + elif os.path.exists(filename + ".save"): import pickle filename += ".save" - with open(filename, "wb") as f: + with open(filename, "rb") as f: self.results = pickle.load(f) else: raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), filename) |
