From 9d88a5de72623b62cb23c2f36be7e4bd1999cf0b Mon Sep 17 00:00:00 2001 From: Lee de Mora Date: Thu, 14 Dec 2023 15:40:36 +0000 Subject: [PATCH] bug fix --- bgcval2/analysis_compare.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bgcval2/analysis_compare.py b/bgcval2/analysis_compare.py index 9c3d5c6e..e0ad87fb 100755 --- a/bgcval2/analysis_compare.py +++ b/bgcval2/analysis_compare.py @@ -514,11 +514,12 @@ def load_comparison_yml(master_compare_yml_fn): details['dpi'] = input_yml_dict.get('dpi', None) details['savepdf'] = input_yml_dict.get('savepdf', False) - try: - int(details['dpi']) - except: - raise ValueError(''.join(["Loading yml error: `dpi` needs to be an integer. Current value:", - str(details['dpi'])])) + if details['dpi']: # None is valid! + try: + int(details['dpi']) + except: + raise ValueError(''.join(["Loading yml error: `dpi` needs to be an integer. Current value:", + str(details['dpi'])])) # auto download, can differ for each job. auto_download = input_yml_dict.get('auto_download', True)