Skip to content

Commit

Permalink
Try remove the index as well
Browse files Browse the repository at this point in the history
  • Loading branch information
alexamici committed Nov 10, 2023
1 parent 8ee4f3f commit cada1d7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions xarray_ecmwf/engine_ecmwf.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ def retrieve(
if not cache_file:
try:
os.remove(path)
# remove the associated cfgrib index file
try:
os.remove(path + ".idx")
except Exception:
pass
except Exception:
logging.exception("While removing a cache file")

Expand Down

0 comments on commit cada1d7

Please sign in to comment.