Skip to content

Commit

Permalink
added error message for incorrect dpi.
Browse files Browse the repository at this point in the history
  • Loading branch information
ledm committed Dec 14, 2023
1 parent 2c5aa6b commit 9efd700
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bgcval2/analysis_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +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'])]))

# auto download, can differ for each job.
auto_download = input_yml_dict.get('auto_download', True)
auto_download_dict = {jobID: auto_download for jobID in details['jobs'].keys()}
Expand Down

0 comments on commit 9efd700

Please sign in to comment.