diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2024-10-18 02:41:26 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2024-10-18 02:41:26 +0200 |
commit | cc9939ea87393cc5b5036fa786d6a9b385971d06 (patch) | |
tree | 2bcd4002150b4bde807bdd15e75ccbca9f0b5d05 | |
parent | 274df86d989203823967bf34109801d30335a61d (diff) | |
download | meteo_toolbox-cc9939ea87393cc5b5036fa786d6a9b385971d06.tar.gz |
flatten index
-rw-r--r-- | metchart/manager.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/metchart/manager.py b/metchart/manager.py index a7e3eaa..36cfaa9 100644 --- a/metchart/manager.py +++ b/metchart/manager.py @@ -29,7 +29,8 @@ class Manager: index = ThreadPool(self._thread_count).map(lambda p: p['module'].run(**p['cfg']), self._plotters) with open(os.path.join(self._output_dir, 'index.json'), 'w') as f: - f.write(json.dumps(index, indent=4)) + # NOTE index needs to be flattened. + f.write(json.dumps([x for xs in index for x in xs], indent=4)) def _load(self): with open(self._filename, 'r') as f: |