Skip to content

Commit e35677d

Browse files
committed
Switch to os.makedirs
1 parent 2ddbd24 commit e35677d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Metallicity_Stack_Commons/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ def dir_date(folder_name, path_init='', year=False, verbose=False, log=None):
117117

118118
fitspath = os.path.join(*list_path)
119119
try:
120-
os.mkdir(fitspath)
121-
except FileExistsError:
120+
os.makedirs(fitspath)
121+
except OSError:
122122
log.warning(f"Path already exists : {fitspath}")
123123

124124
log_verbose(log, "finished.", verbose=verbose)

0 commit comments

Comments
 (0)