Skip to content

Commit

Permalink
Fix rmtree call
Browse files Browse the repository at this point in the history
  • Loading branch information
marty-sullivan committed Aug 29, 2015
1 parent 2ff7c1a commit cbd9d6c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pyndfd/ndfd.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
NDFD Forecast Retrieval Routines
Author: Marty J. Sullivan
Revision: 0.6
Revision: 0.8
Purpose: Routines that will cache NDFD forecast variables locally
to allow for easy and fast forecast analysis by lat/lon
Expand Down Expand Up @@ -146,7 +146,8 @@ def getVariable(var, area):
gribs = []
dirTime = NDFD_TMP + getLatestForecastTime().strftime('%Y-%m-%d-%H') + path.sep
if not path.isdir(dirTime):
rmtree(NDFD_TMP)
try: rmtree(NDFD_TMP)
except: pass
makedirs(dirTime)
if area in DEFS['vars']:
for vp in DEFS['vars'][area]:
Expand Down

0 comments on commit cbd9d6c

Please sign in to comment.