create directory if it doesn't exist

This commit is contained in:
Carl Pearson
2022-11-02 08:50:33 -07:00
parent f65421a4cf
commit a57793a6f4

View File

@@ -9,6 +9,10 @@ import scipy.io
from lib import config
def download_ss_index(path):
path_dir = path.parent
path_dir.mkdir(parents=True, exist_ok=True)
with open(path, "wb") as f:
req = requests.get(config.SS_ROOT_URL + "/files/ss_index.mat")
f.write(req.content)