diff options
author | Frederick Muriuki Muriithi | 2023-05-22 10:19:42 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-05-22 10:20:57 +0300 |
commit | cb52df1c320463674938462a68e0a3be4279473b (patch) | |
tree | d9250ff1d370a447d480841e6a9b3fe62292b69e /scripts | |
parent | 2df4c10b0d4bcab6370946b7c258ab09c18c7a7f (diff) | |
download | genenetwork3-cb52df1c320463674938462a68e0a3be4279473b.tar.gz |
Make directory at "path" and all intermediate ones.
Make the directory at the given path, and any intermediate ones to avoid
errors in the indexing code when the directory, or its parent(s) do not exist.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/index-genenetwork | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/index-genenetwork b/scripts/index-genenetwork index 401ae1a..4da82e4 100755 --- a/scripts/index-genenetwork +++ b/scripts/index-genenetwork @@ -131,6 +131,8 @@ def locked_xapian_writable_database(path: pathlib.Path) -> xapian.WritableDataba between processes. """ # pylint: disable-next=invalid-name + if not path.exists(): + os.makedirs(path) db = xapian.WritableDatabase(str(path)) db.begin_transaction() try: |