payu-org / payu

A workflow management tool for numerical models on the NCI computing systems
Apache License 2.0
18 stars 25 forks source link

Add bug fix for restart history with empty archive directory #423

Closed jo-basevi closed 3 months ago

jo-basevi commented 3 months ago

There's a bug in the get_restarts_to_prune() method which raises an error when restart_history is configured and an archive directory exists but it contains no restarts.

I've added a test case that was able to recreate the error.

I could also do an early return if there is no restarts, but I've left the check for it later in the method to after checks for valid config.yaml values. But it would be an easy change to add that.

Closes #422