From 4b2535521e4e406c10e543713df22dd7c79304e1 Mon Sep 17 00:00:00 2001 From: Paul Madden <136389411+maddenp-noaa@users.noreply.github.com> Date: Wed, 7 Aug 2024 16:00:57 -0600 Subject: [PATCH] Use .get() lookups for optional schism, ww3 template_value items (#562) --- src/uwtools/drivers/schism.py | 2 +- src/uwtools/drivers/ww3.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uwtools/drivers/schism.py b/src/uwtools/drivers/schism.py index 0e86dda11..84aa0ee7c 100644 --- a/src/uwtools/drivers/schism.py +++ b/src/uwtools/drivers/schism.py @@ -34,7 +34,7 @@ def namelist_file(self): render( input_file=template_file, output_file=path, - overrides=self.config[STR.namelist]["template_values"], + overrides=self.config[STR.namelist].get("template_values", {}), ) @tasks diff --git a/src/uwtools/drivers/ww3.py b/src/uwtools/drivers/ww3.py index 0da7bda53..5dfe00e98 100644 --- a/src/uwtools/drivers/ww3.py +++ b/src/uwtools/drivers/ww3.py @@ -34,7 +34,7 @@ def namelist_file(self): render( input_file=template_file, output_file=path, - overrides=self.config[STR.namelist]["template_values"], + overrides=self.config[STR.namelist].get("template_values", {}), ) @tasks