aboutsummaryrefslogtreecommitdiff
path: root/metchart
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2024-10-18 02:41:26 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2024-10-18 02:41:26 +0200
commitcc9939ea87393cc5b5036fa786d6a9b385971d06 (patch)
tree2bcd4002150b4bde807bdd15e75ccbca9f0b5d05 /metchart
parent274df86d989203823967bf34109801d30335a61d (diff)
downloadmeteo_toolbox-cc9939ea87393cc5b5036fa786d6a9b385971d06.tar.gz
flatten index
Diffstat (limited to 'metchart')
-rw-r--r--metchart/manager.py3
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: