Skip to content

Commit

Permalink
Check freq before trying to calculate modulo
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHuber-NOAA committed Dec 16, 2024
1 parent be7626d commit 5ca6e61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ush/python/pygfs/task/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ def _archive_expdir(self, arch_dict: Dict[str, Any]) -> bool:
if current_cycle in [first_full, edate]:
# Always save the first and last
return True
elif (current_cycle - first_full).total_seconds() % freq == 0:
elif freq != 0 and (current_cycle - first_full).total_seconds() % freq == 0:
# Otherwise, the frequency is in hours
return True
else:
Expand Down

0 comments on commit 5ca6e61

Please sign in to comment.