Skip to content

Commit ea47458

Browse files
committed
Add a makedirs for 99-getdata.py
1 parent 89863f7 commit ea47458

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

99-get_data.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def get_filtered_isd(data_dir, s_date=None, f_date=None,
2121
fname = 'isd-history.csv'
2222
target_file = os.path.join(data_dir, fname)
2323

24+
os.makedirs(data_dir, exist_ok=True)
2425
if not os.path.exists(target_file) and allow_download:
2526
url_target = 'ftp://ftp.ncdc.noaa.gov/pub/data/noaa/isd-history.csv'
2627
with open(target_file, 'wb') as fout:

0 commit comments

Comments
 (0)