Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
Another change per Ivan suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
rmcd-mscb committed Sep 24, 2019
1 parent 5b8e307 commit fdf7e0e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkg/Gridmet_current.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,9 @@ def getxml(url):
masterURL = serverURL + '/' + data + '/' + urlsuffix
datadef = getxml(masterURL)['gridDataset']['TimeSpan']['end']
gm_date = datetime.strptime(datadef[:10],'%Y-%m-%d').date()
if gm_date == yesterday:
print(f'Gridmet data {data} is updated - continue')
else:
if gm_date != yesterday:
print(f'Gridmet data {data} is not available - process exiting')
sys.exit(1)
print('All data ready to pull')
sys.exit(0)

def getxml(url):
http = urllib3.PoolManager()
Expand Down

0 comments on commit fdf7e0e

Please sign in to comment.