Skip to content

Commit

Permalink
Use .get() lookups for optional schism, ww3 template_value items (#562)
Browse files Browse the repository at this point in the history
  • Loading branch information
maddenp-noaa authored Aug 7, 2024
1 parent 2d0046f commit 4b25355
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/uwtools/drivers/schism.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/uwtools/drivers/ww3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4b25355

Please sign in to comment.