Skip to content

Commit

Permalink
Fix bug with generating SWE legends
Browse files Browse the repository at this point in the history
Since changing the path for legends to be deeper, we need to update
mkdir calls to create parents if needed.
  • Loading branch information
mfisher87 committed Mar 6, 2024
1 parent c7d0950 commit 29177de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions snow_today_webapp_ingest/ingest/legends.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def generate_swe_legends(
colormap_id = variable_params["colormapId"]
colormap = colormaps_json[str(colormap_id)]["colors"]

to_path.mkdir(exist_ok=True)
to_path.mkdir(exist_ok=True, parents=True)
make_legend(
colormap=colormap,
# This value range could be static every day, or it could change
Expand Down Expand Up @@ -81,7 +81,7 @@ def generate_ssp_legends(
output_fn = f"{region_id}_{variable_id}.svg"
output_fp = to_path / output_fn

to_path.mkdir(exist_ok=True)
to_path.mkdir(exist_ok=True, parents=True)
make_legend(
colormap=colormap,
# This value range could be static every day, or it could change
Expand Down

0 comments on commit 29177de

Please sign in to comment.