From f9149d7d1738a5f87501f596fe00f842a4b38ba8 Mon Sep 17 00:00:00 2001 From: Florent Guiotte Date: Thu, 18 Feb 2021 17:56:45 +0100 Subject: [PATCH] Fix for Python < 3.9 --- idefix/tools/rasterize.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/idefix/tools/rasterize.py b/idefix/tools/rasterize.py index 0a959e3..14c02b8 100755 --- a/idefix/tools/rasterize.py +++ b/idefix/tools/rasterize.py @@ -78,7 +78,9 @@ def main(): config = {'global': {'out_dir': out_dir}} - config.update(json.load(open(args.c)) if args.c else {}) + config_json = json.load(open(args.c)) if args.c else {} + config['global'].update(config_json['global'] if 'global' in config_json else {}) + config['rasters'] = config_json['rasters'] if 'rasters' in config_json else {} globalc = config['global'] rasters = config['rasters'] if 'rasters' in config else [{}]