create directory if it doesn't exist
This commit is contained in:
@@ -9,6 +9,10 @@ import scipy.io
|
|||||||
from lib import config
|
from lib import config
|
||||||
|
|
||||||
def download_ss_index(path):
|
def download_ss_index(path):
|
||||||
|
|
||||||
|
path_dir = path.parent
|
||||||
|
path_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
with open(path, "wb") as f:
|
with open(path, "wb") as f:
|
||||||
req = requests.get(config.SS_ROOT_URL + "/files/ss_index.mat")
|
req = requests.get(config.SS_ROOT_URL + "/files/ss_index.mat")
|
||||||
f.write(req.content)
|
f.write(req.content)
|
||||||
@@ -51,4 +55,4 @@ def dtype_from_rbtype(rbtype):
|
|||||||
|
|
||||||
DTYPES = {}
|
DTYPES = {}
|
||||||
for i in range(len(names)):
|
for i in range(len(names)):
|
||||||
DTYPES[(groups[i], names[i])] = dtype_from_rbtype(rbtype[i])
|
DTYPES[(groups[i], names[i])] = dtype_from_rbtype(rbtype[i])
|
||||||
|
Reference in New Issue
Block a user