Skip to content

Commit 8147fde

Browse files
committed
Use os.makedirs() instead of os.mkdir()
1 parent 057e531 commit 8147fde

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

executorlib/interactive/shared.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,13 +618,12 @@ def _execute_task_with_cache(
618618
"""
619619
from executorlib.standalone.hdf import dump, get_output
620620

621+
future = task_dict["future"]
621622
task_key, data_dict = serialize_funct_h5(
622623
task_dict["fn"], *task_dict["args"], **task_dict["kwargs"]
623624
)
625+
os.makedirs(cache_directory, exist_ok=True)
624626
file_name = os.path.join(cache_directory, task_key + ".h5out")
625-
if not os.path.exists(cache_directory):
626-
os.mkdir(cache_directory)
627-
future = task_dict["future"]
628627
if task_key + ".h5out" not in os.listdir(cache_directory):
629628
_execute_task(
630629
interface=interface,

0 commit comments

Comments
 (0)