Skip to content

Commit dc4a23e

Browse files
committed
Add check for existence of directory before writing to it.
1 parent 7509e81 commit dc4a23e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

gimpopenvino/plugins/openvino_utils/tools/model_manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,7 @@ def _download_model(self, model_id):
882882

883883
# Specify the file name
884884
file_name = "config.json"
885+
os.makedirs(os.path.dirname(full_install_path), exist_ok=True)
885886

886887
# Write the data to a JSON file
887888
with open(os.path.join(full_install_path,file_name), 'w') as json_file:

0 commit comments

Comments
 (0)